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

Docker build don't work #25

Open
websidian opened this issue Mar 28, 2022 · 4 comments
Open

Docker build don't work #25

websidian opened this issue Mar 28, 2022 · 4 comments

Comments

@websidian
Copy link

My Docker build didn't work, I think becaus of django filler...
Am I doing somthing wrong ?

`XYZ:~/_dev/development/django-cms-quickstart$ sudo docker-compose build web
Building web
Sending build context to Docker daemon 188.9kB
Step 1/6 : FROM python:3.9
3.9: Pulling from library/python
5492f66d2700: Pull complete
540ff8c0841d: Pull complete
a0bf850a0df0: Pull complete
d751dc38ae51: Pull complete
9720a112e886: Pull complete
f97b81fbdbd9: Pull complete
e0fc7cdc10cb: Pull complete
c749d2e5ce0f: Pull complete
71985ebd4155: Pull complete
Digest: sha256:0208c1b66de6e22480b3ad6334fc4fe2ef030572cf1fb1f699e68038fafcad00
Status: Downloaded newer image for python:3.9
---> 40264b427ab5
Step 2/6 : WORKDIR /app
---> Running in c7118202e88e
Removing intermediate container c7118202e88e
---> 9b576bf5f2cb
Step 3/6 : COPY . /app
---> f63e7e1eb0fa
Step 4/6 : RUN pip install -r requirements.txt
---> Running in 1ae5bcc35214
Collecting django-filer@ https://github.com/django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c52e3d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c57f6d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c52e760>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c52e280>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c52e0d0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /django-cms/django-filer/archive/refs/tags/2.1.1.zip (Caused by NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f6a9c52e4f0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
ERROR: Service 'web' failed to build : Build failed
`

@crydotsnake
Copy link
Contributor

crydotsnake commented Mar 29, 2022

Hello @websidian,

This looks like a network issue. Could you maybe try it again?

A hint:
You shouldn't run docker with sudo. In case you are using Linux, you can add your user to the docker group: https://docs.docker.com/engine/install/linux-postinstall/

@marksweb
Copy link
Member

I'm unable to reproduce this.

I'd 2nd the network error potential.

 => [internal] load build context                                                                                                                                      0.3s
 => => transferring context: 224.86kB                                                                                                                                  0.3s
 => [2/5] WORKDIR /app                                                                                                                                                 1.0s
 => [3/5] COPY . /app                                                                                                                                                  0.1s
 => [4/5] RUN pip install -r requirements.txt                                                                                                                         72.8s
 => [5/5] RUN python manage.py collectstatic --noinput                                                                                                                 6.3s
 => exporting to image                                                                                                                                                 7.4s
 => => exporting layers                                                                                                                                                7.3s
 => => writing image sha256:ff7a450f6456ed17ef923b8dce7e5028a2819526d94ff493a24b80f7a2a443f4                                                                           0.0s
 => => naming to docker.io/library/django-cms-quickstart_web                                                                                                           0.0s

@websidian
Copy link
Author

@crydotsnake
followed your link

now, our docker user is in sudo group.
And we can start it without sudo now, thanks.

but we still get the same error as mentioned before.

`$ docker compose build web
Sending build context to Docker daemon 109.3kB
Step 1/6 : FROM python:3.9
---> 40264b427ab5
Step 2/6 : WORKDIR /app
---> Using cache
---> 9b576bf5f2cb
Step 3/6 : COPY . /app
---> Using cache
---> 4e77e5bfc42f
Step 4/6 : RUN pip install -r requirements.txt
---> Running in e57800677837
Collecting django-filer@ https://github.com/django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3176538d60>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3176538dc0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f31765382e0>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f3176538250>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f31765a4c10>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution')': /django-cms/django-filer/archive/refs/tags/2.1.1.zip
ERROR: Could not install packages due to an OSError: HTTPSConnectionPool(host='github.com', port=443): Max retries exceeded with url: /django-cms/django-filer/archive/refs/tags/2.1.1.zip (Caused by NewConnectionError('<pip._vendor.urllib3.connection.HTTPSConnection object at 0x7f31765a4b50>: Failed to establish a new connection: [Errno -3] Temporary failure in name resolution'))

1 error occurred:
* Status: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1, Code: 1`

@crydotsnake
Copy link
Contributor

Can you maybe try restarting Docker?

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

3 participants