goharbor / harbor-arm

Build Harbor for arm architecture.
Apache License 2.0
69 stars 41 forks source link

Last Step: Error ; #51

Open CarmanZheng opened 11 months ago

CarmanZheng commented 11 months ago

在arm机器上,最后一步了,出现这个问题

5 | >>> && ln -sf /dev/stdout /var/log/nginx/access.log \ 6 | >>> && ln -sf /dev/stderr /var/log/nginx/error.log \ 7 | >>> && groupadd -r -g 10000 nginx && useradd --no-log-init -r -g 10000 -u 10000 nginx \ 8 | >>> && chown -R nginx:nginx /etc/nginx

ERROR: failed to solve: process "/bin/sh -c tdnf install -y nginx shadow >> /dev/null && tdnf clean all && ln -sf /dev/stdout /var/log/nginx/access.log && ln -sf /dev/stderr /var/log/nginx/error.log && groupadd -r -g 10000 nginx && useradd --no-log-init -r -g 10000 -u 10000 nginx && chown -R nginx:nginx /etc/nginx" did not complete successfully: exit code: 9 building portal container for photon...

.........


Dockerfile:9

8 |
9 | >>> RUN apt-get update \ 10 | >>> && apt-get install -y --no-install-recommends python-yaml=3.12-1 11 |

ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install -y --no-install-recommends python-yaml=3.12-1" did not complete successfully: exit code: 100 make[2]: [/root/software/harbor/harbor-arm/src/github.com/goharbor/harbor/make/photon/Makefile:142: _build_portal] Error 1 make[2]: Leaving directory '/root/software/harbor/harbor-arm/src/github.com/goharbor/harbor' make[1]: [Makefile:419: build] Error 2 make[1]: Leaving directory '/root/software/harbor/harbor-arm/src/github.com/goharbor/harbor' make: *** [Makefile:190: build] Error 2

How to do ?

jerryleon007 commented 10 months ago

首先run一个photon,试一试apt-get是否能成功,如果您容器采用yum或者dnf的把这里去掉第9行,10行不要参数--no-install-recommends,把apt-get改成yum即可. 像这样: RUN yum install -y python-yaml=3.12-1 或者 RUN tdnf install -y python-yaml=3.12-1

yunzck8s commented 9 months ago

@jerryleon007 Hi,这里的基础镜像是node:15.4.0,无法使用yum或者apt-get

enqi1 commented 8 months ago

| >>> RUN apt-get update 10 | >>> && apt-get install -y --no-install-recommends python-yaml=3.12-1 apt源有问题,换源,现在源没有python-yaml=3.12-1版本,试试3.13-2