Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

docker compose up fails to build #66

Closed
moeinrahimi opened this issue Feb 26, 2024 · 5 comments
Closed

docker compose up fails to build #66

moeinrahimi opened this issue Feb 26, 2024 · 5 comments
Labels
help wanted Extra attention is needed

Comments

@moeinrahimi
Copy link

moeinrahimi commented Feb 26, 2024

sudo docker compose up -d
[+] Building 26.8s (8/12)
 => [warp-clash internal] load build definition from Dockerfile                                0.2s
 => => transferring dockerfile: 689B                                                           0.0s
 => [warp-clash internal] load .dockerignore                                                   0.1s
 => => transferring context: 125B                                                              0.0s
 => [warp-clash internal] load metadata for docker.io/library/python:3.11-alpine               1.4s
 => [warp-clash 1/8] FROM docker.io/library/python:3.11-alpine@sha256:2c0e25da660a20c1e99ccd0  9.7s
 => => resolve docker.io/library/python:3.11-alpine@sha256:2c0e25da660a20c1e99ccd091a3fdda4c6  0.0s
 => => sha256:2c0e25da660a20c1e99ccd091a3fdda4c6e3525d91fe5306d89cc24b54fc6b9 1.65kB / 1.65kB  0.0s
 => => sha256:d1975f2182c9962f5daa1ad935eb092e3e32dce11d8105cb3584a31afc7b451 1.37kB / 1.37kB  0.0s
 => => sha256:82d7337f8f9414d725a28b8c1c2a4ccf33eca41ccf76d6e86eb19a790396868 6.26kB / 6.26kB  0.0s
 => => sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf 3.41MB / 3.41MB  1.1s
 => => sha256:dca80dc46cecdd1a97787a1dd6f74263b9d2f7b0dd3e2e15c109f5e3484 622.15kB / 622.15kB  0.8s
 => => sha256:1eedcd8cec5653cf18f418910cf3a85a6fa05204897bcd3d59b2ffe4f22fc 12.66MB / 12.66MB  2.1s
 => => sha256:6d299437f6b433cfb6303b1f5ed739cb25eab4e32ae16e096aacefe4dcd86464 239B / 239B     1.2s
 => => sha256:655c65f49da74e6db86d39a9bd3acb6dc6d26afa77f4781bbcf1843305d0321 3.13MB / 3.13MB  1.8s
 => => extracting sha256:4abcf20661432fb2d719aaf90656f55c287f8ca915dc1c92ec14ff61e67fbaf8      1.1s
 => => extracting sha256:dca80dc46cecdd1a97787a1dd6f74263b9d2f7b0dd3e2e15c109f5e34848c932      1.0s
 => => extracting sha256:1eedcd8cec5653cf18f418910cf3a85a6fa05204897bcd3d59b2ffe4f22fc5e7      3.1s
 => => extracting sha256:6d299437f6b433cfb6303b1f5ed739cb25eab4e32ae16e096aacefe4dcd86464      0.0s
 => => extracting sha256:655c65f49da74e6db86d39a9bd3acb6dc6d26afa77f4781bbcf1843305d03211      1.5s
 => [warp-clash internal] load build context                                                   2.1s
 => => transferring context: 11.02MB                                                           1.6s
 => [warp-clash 2/8] WORKDIR /app                                                              0.5s
 => [warp-clash 3/8] RUN if [ "$GITHUB_ACTIONS" != "true" ]; then         sed -i 's/dl-cdn.al  2.3s
 => ERROR [warp-clash 4/8] RUN apk add --no-cache bash build-base libffi-dev openssl-dev      12.1s
------
 > [warp-clash 4/8] RUN apk add --no-cache bash build-base libffi-dev openssl-dev:
#0 1.999 fetch https://mirrors.aliyun.com/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
#0 7.011 fetch https://mirrors.aliyun.com/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
#0 7.014 WARNING: fetching https://mirrors.aliyun.com/alpine/v3.19/main: temporary error (try again later)
#0 12.02 WARNING: fetching https://mirrors.aliyun.com/alpine/v3.19/community: temporary error (try again later)
#0 12.02 ERROR: unable to select packages:
#0 12.02   bash (no such package):
#0 12.02     required by: world[bash]
#0 12.02   build-base (no such package):
#0 12.02     required by: world[build-base]
#0 12.02   libffi-dev (no such package):
#0 12.02     required by: world[libffi-dev]
#0 12.02   openssl-dev (no such package):
#0 12.02     required by: world[openssl-dev]
------
failed to solve: process "/bin/sh -c apk add --no-cache bash build-base libffi-dev openssl-dev" did not complete successfully: exit code: 4
@vvbbnn00
Copy link
Owner

是在本地还是服务器编译的?海外服务器的话试试把这段删掉编译

RUN if [ "$GITHUB_ACTIONS" != "true" ]; then \
sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories; \
fi

@vvbbnn00 vvbbnn00 added the help wanted Extra attention is needed label Feb 26, 2024
@moeinrahimi
Copy link
Author

yes it is located on digital ocean in europe.
am I doing it correctly?
it still throws error like before
image

@vvbbnn00
Copy link
Owner

It seems that there is no problem with the configuration.
Looking at the error log you provided the first time,

=> ERROR [warp-clash 4/8] RUN apk add --no-cache bash build-base libffi-dev openssl-dev 12.1s
[warp-clash 4/8] RUN apk add --no-cache bash build-base libffi-dev openssl-dev:
#0 1.999 fetch https://mirrors.aliyun.com/alpine/v3.19/main/x86_64/APKINDEX.tar.gz
#0 7.011 fetch https://mirrors.aliyun.com/alpine/v3.19/community/x86_64/APKINDEX.tar.gz
#0 7.014 WARNING: fetching https://mirrors.aliyun.com/alpine/v3.19/main: temporary error (try again later)
#0 12.02 WARNING: fetching https://mirrors.aliyun.com/alpine/v3.19/community: temporary error (try again later)
#0 12.02 ERROR: unable to select packages:
#0 12.02 bash (no such package):
#0 12.02 required by: world[bash]
#0 12.02 build-base (no such package):
#0 12.02 required by: world[build-base]
#0 12.02 libffi-dev (no such package):
#0 12.02 required by: world[libffi-dev]
#0 12.02 openssl-dev (no such package):
#0 12.02 required by: world[openssl-dev]
failed to solve: process "/bin/sh -c apk add --no-cache bash build-base libffi-dev openssl-dev" did not complete successfully: exit code: 4

it seems that the problem was due to network issues that prevented the software package from being obtained. In theory, the same problem should not occur again.
If the problem still exists, could you please provide the log again? Thank you.

@moeinrahimi
Copy link
Author

moeinrahimi commented Feb 26, 2024

I tried with both scenarios github_action being commented or not either way it throws error.
i'm getting my vps from oracle cloud an it is located in netherland. I can confirm using curl I have access to outside world.
image
image

@vvbbnn00
Copy link
Owner

According to gliderlabs/docker-alpine#334

The problem might be related to network issues within the Docker container, such as DNS resolution. You can try configuring the DNS settings for Docker containers by editing the /etc/docker/daemon.json file.

Repository owner locked and limited conversation to collaborators Mar 1, 2024
@vvbbnn00 vvbbnn00 converted this issue into discussion #122 Mar 1, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants