Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Last Step: Error ; #51

Open
CarmanZheng opened this issue Aug 18, 2023 · 3 comments
Open

Last Step: Error ; #51

CarmanZheng opened this issue Aug 18, 2023 · 3 comments

Comments

@CarmanZheng
Copy link

在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
Copy link

首先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
Copy link

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

@enqi1
Copy link

enqi1 commented Nov 18, 2023

| >>> 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants