anyproto / any-sync-dockercompose

docker-compose for testing any-sync
MIT License
234 stars 29 forks source link

The problem occurred after I tried make start #67

Open Skidder1337 opened 4 weeks ago

Skidder1337 commented 4 weeks ago

Have you read a contributing guide?

Current Behavior

docker buildx build --tag generateconfig-env --file Dockerfile-generateconfig-env . [+] Building 45.5s (12/12) FINISHED docker:default => [internal] load build definition from Dockerfile-generateconfig-env 0.0s => => transferring dockerfile: 51B 0.0s => [internal] load .dockerignore 0.0s => => transferring context: 2B 0.0s => resolve image config for docker.io/docker/dockerfile:1 1.0s => CACHED docker-image://docker.io/docker/dockerfile:1@sha256:a57df69d0ea827fb7266491f2813635de6f17269be881f696fbfdf2d83dda33e 0.0s => [internal] load build definition from Dockerfile-generateconfig-env 0.0s => [internal] load metadata for docker.io/library/python:3.11-alpine 0.0s => [internal] load .dockerignore 0.0s => [1/4] FROM docker.io/library/python:3.11-alpine 0.0s => [internal] load build context 0.0s => => transferring context: 104B 0.0s => CACHED [2/4] WORKDIR /code 0.0s => CACHED [3/4] COPY docker-generateconfig/env-requirements.txt requirements.txt 0.0s => ERROR [4/4] RUN pip install -r requirements.txt 44.3s


[4/4] RUN pip install -r requirements.txt:
6.702 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 0x7fad080b6490>: Failed to establish a new connection: [Errno -3] Try again')': /simple/requests/
12.21 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 0x7fad0893f8d0>: Failed to establish a new connection: [Errno -3] Try again')': /simple/requests/
18.21 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 0x7fad080c22d0>: Failed to establish a new connection: [Errno -3] Try again')': /simple/requests/ 25.22 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 0x7fad080c36d0>: Failed to establish a new connection: [Errno -3] Try again')': /simple/requests/ 34.23 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 0x7fad080c3e50>: Failed to establish a new connection: [Errno -3] Try again')': /simple/requests/ 39.23 ERROR: Could not find a version that satisfies the requirement requests==2.32.2 (from versions: none) 39.23 ERROR: No matching distribution found for requests==2.32.2

ERROR: failed to solve: executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1 make: *** [Makefile:4: generate_env] Error 1 root@8362:~/any-sync-dockercompose#

Expected Behavior

success

Steps To Reproduce

I use an ipv6 only server that uses warp to obtain ipv4

Environment

- OS: Debian 12
- Version:latest

Anything else?

No response

fb929 commented 4 weeks ago

it seems there is an issue between your system and pip - https://github.com/pypi/warehouse/issues/15277 try switching to IPv4 or using mirrors

Skidder1337 commented 4 weeks ago

it seems there is an issue between your system and pip - pypi/warehouse#15277 try switching to IPv4 or using mirrors

can u give a way to fix it? i am a starter for docker

Skidder1337 commented 4 weeks ago

it seems there is an issue between your system and pip - pypi/warehouse#15277 try switching to IPv4 or using mirrors

i can install requests in the server but no in docker

fb929 commented 4 weeks ago

judging by the error, the problem is not with docker, problem with the pypi infrastructure. to ensure that, you can try to run in your "docker-host" machine: pip install -r docker-generateconfig/env-requirements.txt

Skidder1337 commented 3 weeks ago

judging by the error, the problem is not with docker, problem with the pypi infrastructure. to ensure that, you can try to run in your "docker-host" machine: pip install -r docker-generateconfig/env-requirements.txt

it works

fb929 commented 3 weeks ago

you might be experiencing some connection issues with the internet in your Docker network. check if the container can access PyPI:

docker buildx build --tag generateconfig-env --file Dockerfile-generateconfig-env .
docker run --rm --volume ${PWD}/:/code/ -it --entrypoint /bin/sh generateconfig-env
# in container shell
apk add curl
curl https://pypi.org/simple/
Skidder1337 commented 3 weeks ago

you might be experiencing some connection issues with the internet in your Docker network. check if the container can access PyPI:

docker buildx build --tag generateconfig-env --file Dockerfile-generateconfig-env .
docker run --rm --volume ${PWD}/:/code/ -it --entrypoint /bin/sh generateconfig-env
# in container shell
apk add curl
curl https://pypi.org/simple/

yes it can

image

fb929 commented 3 weeks ago

can you show the output of the command from the same container?

pip install -r requirements.txt -vvv
Skidder1337 commented 3 weeks ago

image

fb929 commented 3 weeks ago

sorry, that was the wrong command. please press this one:

pip install -r docker-generateconfig/env-requirements.txt -vvv
Skidder1337 commented 2 weeks ago

sorry, that was the wrong command. please press this one:

pip install -r docker-generateconfig/env-requirements.txt -vvv

oh i tried docker buildx build --tag generateconfig-env --file Dockerfile-generateconfig-env . docker run --rm --volume ${PWD}/:/code/ -it --entrypoint /bin/sh generateconfig-env then i got

6.702 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 0x7fad080b6490>: Failed to establish a new connection: [Errno -3] Try again')': /simple/requests/

issues

fb929 commented 2 weeks ago

try to edit this line: https://github.com/anyproto/any-sync-dockercompose/blob/main/Dockerfile-generateconfig-env#L5 like this:

RUN pip install -r requirements.txt -vvv
neo0245 commented 2 weeks ago
  1. Log into Ubuntu as a user with sudo privileges.

  2. Open the /etc/default/docker file for editing :

    $ sudo nano /etc/default/docker

  3. Add the following setting for Docker.

    DOCKER_OPTS="--dns 8.8.8.8"

  4. Save and close the file.

  5. Restart the Docker daemon :

    $ sudo systemctl restart docker

fb929 commented 1 week ago
  1. Log into Ubuntu as a user with sudo privileges.
  2. Open the /etc/default/docker file for editing : $ sudo nano /etc/default/docker
  3. Add the following setting for Docker. DOCKER_OPTS="--dns 8.8.8.8"
  4. Save and close the file.
  5. Restart the Docker daemon : $ sudo systemctl restart docker

@Skidder1337 did this solve your problem?