huashengdun / webssh

:seedling: Web based ssh client
https://webssh.huashengdun.org/
MIT License
4.48k stars 1.26k forks source link

Docker build failed #354

Closed sigma2017 closed 1 year ago

sigma2017 commented 1 year ago

`root@vapor:~/webssh #docker build -t webssh . [+] Building 10.4s (8/8) FINISHED => [internal] load build definition from Dockerfile 0.0s => => transferring dockerfile: 456B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 45B 0.0s => [internal] load metadata for docker.io/library/python:3-alpine 0.0s => [internal] load build context 0.0s => => transferring context: 903.08kB 0.0s => [1/4] FROM docker.io/library/python:3-alpine 0.0s => CACHED [2/4] ADD . /code 0.0s => CACHED [3/4] WORKDIR /code 0.0s => ERROR [4/4] RUN apk add --no-cache libc-dev libffi-dev gcc && pip install -r requirements.txt --no-cache-dir && apk del gcc libc-dev libffi-dev && addgro 10.3s

[4/4] RUN apk add --no-cache libc-dev libffi-dev gcc && pip install -r requirements.txt --no-cache-dir && apk del gcc libc-dev libffi-dev && addgroup webssh && adduser -Ss /bin/false -g webssh webssh && chown -R webssh:webssh /code:

0 0.159 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/main/x86_64/APKINDEX.tar.gz

0 5.164 fetch https://dl-cdn.alpinelinux.org/alpine/v3.18/community/x86_64/APKINDEX.tar.gz

0 5.164 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/main: temporary error (try again later)

0 10.17 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/community: temporary error (try again later)

0 10.17 ERROR: unable to select packages:

0 10.17 gcc (no such package):

0 10.17 required by: world[gcc]

0 10.17 libc-dev (no such package):

0 10.17 required by: world[libc-dev]

0 10.17 libffi-dev (no such package):

0 10.17 required by: world[libffi-dev]


Dockerfile:8

7 | WORKDIR /code 8 | >>> RUN \ 9 | >>> apk add --no-cache libc-dev libffi-dev gcc && \ 10 | >>> pip install -r requirements.txt --no-cache-dir && \ 11 | >>> apk del gcc libc-dev libffi-dev && \ 12 | >>> addgroup webssh && \ 13 | >>> adduser -Ss /bin/false -g webssh webssh && \ 14 | >>> chown -R webssh:webssh /code 15 |

ERROR: failed to solve: process "/bin/sh -c apk add --no-cache libc-dev libffi-dev gcc && pip install -r requirements.txt --no-cache-dir && apk del gcc libc-dev libffi-dev && addgroup webssh && adduser -Ss /bin/false -g webssh webssh && chown -R webssh:webssh /code" did not complete successfully: exit code: 3`

sigma2017 commented 1 year ago

Well, I tried building the image on my server which is an old centos 7 (Docker version 24.0.2) and for some reason is not working. However, it worked on a debian 11 machine (Docker version 24.0.2,). So, there is no issue whatsoever, why it didn't worked on my centos machine even with the same docker version, really don't know. You may close this. thanks.

huashengdun commented 1 year ago

0 5.164 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/main: temporary error (try again later)

0 10.17 WARNING: fetching https://dl-cdn.alpinelinux.org/alpine/v3.18/community: temporary error (try again later)

Probably it is a network problem.