full-stack-fastapi-postgresql
full-stack-fastapi-postgresql copied to clipboard
docker compose up -d fail
Hello, can't build the container, when lunching docker compose up -d, this error accure:
=> CACHED [apiv6frontend:latest stage-1 1/4] FROM docker.io/library/nginx:1.22@sha256:809f0924101d9c07322d69ab0705e1a0d85b1d0f287e320ae19b0826979c56e9 0.0s
=> CACHED [apiv6frontend:latest build-stage 2/7] WORKDIR /app 0.0s
=> CACHED [apiv6frontend:latest build-stage 3/7] COPY package*.json /app/ 0.0s
=> CANCELED [apiv6frontend:latest build-stage 4/7] RUN npm install 0.6s
=> [apiv6backend:latest internal] load build context 0.0s
=> => transferring context: 93.62kB 0.0s
=> [apiv6celeryworker:latest internal] load build context 0.0s
=> => transferring context: 89.12kB 0.0s
=> CACHED [apiv6celeryworker:latest 1/11] FROM docker.io/library/python:3.10@sha256:daed8d46dfc607976178e2f2beb96f03f91240bcb553e0fffd8186b73929db9c 0.0s
=> CACHED [apiv6celeryworker:latest 2/11] WORKDIR /app/ 0.0s
=> CACHED [apiv6celeryworker:latest 3/11] RUN curl -sSL https://install.python-poetry.org | POETRY_HOME=/opt/poetry python3 0.0s
=> ERROR [apiv6celeryworker:latest 4/11] RUN poetry config virtualenvs.create false 0.4s
=> CANCELED [apiv6backend:latest 2/15] RUN pip install --no-cache-dir uvicorn[standard]==0.18.3 0.4s
------
> [apiv6celeryworker:latest 4/11] RUN poetry config virtualenvs.create false:
#0 0.410 /bin/sh: 1: poetry: not found
------
failed to solve: executor failed running [/bin/sh -c poetry config virtualenvs.create false]: exit code: 127
By my little investigation I think the probleme is that the container don't have access to the internet on the build phase (Not sure if this is true) I tried it on : Ubuntu 22.04, debian 11, AlmaLinux 9 always same error, BUT work well on ubuntu 20.04. docker -v Docker version 20.10.21, build baeda1f
> [webh2backend:latest 2/15] RUN pip install --no-cache-dir uvicorn[standard]==0.18.3:
#0 16.39 WARNING: Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/uvicorn/
#0 31.94 WARNING: Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/uvicorn/
#0 47.98 WARNING: Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/uvicorn/
#0 65.03 WARNING: Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/uvicorn/
#0 84.11 WARNING: Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ReadTimeoutError("HTTPSConnectionPool(host='pypi.org', port=443): Read timed out. (read timeout=15)")': /simple/uvicorn/
#0 99.16 ERROR: Could not find a version that satisfies the requirement uvicorn[standard]==0.18.3 (from versions: none)
#0 99.16 ERROR: No matching distribution found for uvicorn[standard]==0.18.3
#0 104.2 WARNING: There was an error checking the latest version of pip.
------
failed to solve: executor failed running [/bin/sh -c pip install --no-cache-dir uvicorn[standard]==0.18.3]: exit code: 1