WRI-Cities / static-GTFS-manager

GUI interface for creating, editing, exporting of static GTFS data for a public transit authority
GNU General Public License v3.0
148 stars 46 forks source link

Error when installing in Docker container #172

Closed chyzhykio closed 1 year ago

chyzhykio commented 1 year ago

Hi. I'm having issue when trying to install GTFS manager in docker container. I'm getting this error in cli:

ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get -y upgrade &&     apt-get install -y python3-pip     && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

Maybe someone can help with solving this problem?

OS: Ubuntu 22.04.2 LTS (But I tried other Linux distros, and had the same error)

Full output:

[+] Building 7.3s (6/10)                                                                                 docker:default
 => [internal] load .dockerignore                                                                                  0.6s
 => => transferring context: 70B                                                                                   0.0s
 => [internal] load build definition from Dockerfile                                                               0.4s
 => => transferring dockerfile: 329B                                                                               0.0s
 => [internal] load metadata for docker.io/library/python:3.6-slim-stretch                                         2.4s
 => CACHED [1/6] FROM docker.io/library/python:3.6-slim-stretch@sha256:66f641652a3549459fe8f72e2daebbb5be383cf312  0.0s
 => [internal] load build context                                                                                  0.3s
 => => transferring context: 9.84kB                                                                                0.0s
 => ERROR [2/6] RUN apt-get update && apt-get -y upgrade &&     apt-get install -y python3-pip     && rm -rf /var  3.5s
------
 > [2/6] RUN apt-get update && apt-get -y upgrade &&     apt-get install -y python3-pip     && rm -rf /var/lib/apt/lists/*:
1.249 Ign:1 http://deb.debian.org/debian stretch InRelease
1.249 Ign:2 http://security.debian.org/debian-security stretch/updates InRelease
1.370 Ign:3 http://security.debian.org/debian-security stretch/updates Release
1.373 Ign:4 http://deb.debian.org/debian stretch-updates InRelease
1.489 Ign:5 http://deb.debian.org/debian stretch Release
1.490 Ign:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
1.541 Ign:7 http://deb.debian.org/debian stretch-updates Release
1.542 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
1.596 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
1.597 Ign:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
1.649 Ign:10 http://deb.debian.org/debian stretch/main all Packages
1.649 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
1.700 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
1.706 Ign:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
1.773 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
1.773 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
1.846 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
1.851 Ign:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
1.898 Ign:10 http://deb.debian.org/debian stretch/main all Packages
1.904 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
1.989 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
1.989 Ign:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
2.049 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
2.049 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
2.108 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
2.128 Err:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages
2.128   404  Not Found
2.168 Ign:10 http://deb.debian.org/debian stretch/main all Packages
2.248 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
2.248 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages
2.306 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
2.353 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
2.396 Ign:10 http://deb.debian.org/debian stretch/main all Packages
2.448 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
2.496 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
2.541 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages
2.614 Ign:10 http://deb.debian.org/debian stretch/main all Packages
2.658 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
2.703 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
2.760 Err:9 http://deb.debian.org/debian stretch/main amd64 Packages
2.760   404  Not Found
2.850 Ign:10 http://deb.debian.org/debian stretch/main all Packages
2.894 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages
2.938 Err:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages
2.938   404  Not Found
2.946 Reading package lists...
2.967 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file.
2.967 W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file.
2.967 W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file.
2.967 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages  404  Not Found
2.967 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages  404  Not Found
2.967 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages  404  Not Found
2.967 E: Some index files failed to download. They have been ignored, or old ones used instead.
------
Dockerfile:3
--------------------
   2 |
   3 | >>> RUN apt-get update && apt-get -y upgrade && \
   4 | >>>     apt-get install -y python3-pip \
   5 | >>>     && rm -rf /var/lib/apt/lists/*
   6 |
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get -y upgrade &&     apt-get install -y python3-pip     && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100
answerquest commented 1 year ago

Sheesh, this thing seems to be erroring out long before even getting to the actual program. It looks like the general libs upgrade for that Ubuntu base image is failing.

I don't know if this would have other knock on effects, but let's try cutting out entanglements with other realms. Can you edit the Dockerfile at your end, Remove this part:

&& apt-get -y upgrade

On Thu, Oct 12, 2023, 01:04 Ihor @.***> wrote:

Hi. I'm having issue when trying to install GTFS manager in docker container. I'm getting this error in cli:

ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get -y upgrade && apt-get install -y python3-pip && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

Maybe someone can help with solving this problem?

OS: Ubuntu 22.04.2 LTS (But I tried other Linux distros, and had the same error)

Full output:

[+] Building 7.3s (6/10) docker:default => [internal] load .dockerignore 0.6s => => transferring context: 70B 0.0s => [internal] load build definition from Dockerfile 0.4s => => transferring dockerfile: 329B 0.0s => [internal] load metadata for docker.io/library/python:3.6-slim-stretch 2.4s => CACHED [1/6] FROM @.***:66f641652a3549459fe8f72e2daebbb5be383cf312 0.0s => [internal] load build context 0.3s => => transferring context: 9.84kB 0.0s => ERROR [2/6] RUN apt-get update && apt-get -y upgrade && apt-get install -y python3-pip && rm -rf /var 3.5s

[2/6] RUN apt-get update && apt-get -y upgrade && apt-get install -y python3-pip && rm -rf /var/lib/apt/lists/*: 1.249 Ign:1 http://deb.debian.org/debian stretch InRelease 1.249 Ign:2 http://security.debian.org/debian-security stretch/updates InRelease 1.370 Ign:3 http://security.debian.org/debian-security stretch/updates Release 1.373 Ign:4 http://deb.debian.org/debian stretch-updates InRelease 1.489 Ign:5 http://deb.debian.org/debian stretch Release 1.490 Ign:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages 1.541 Ign:7 http://deb.debian.org/debian stretch-updates Release 1.542 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages 1.596 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages 1.597 Ign:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages 1.649 Ign:10 http://deb.debian.org/debian stretch/main all Packages 1.649 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages 1.700 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages 1.706 Ign:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages 1.773 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages 1.773 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages 1.846 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages 1.851 Ign:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages 1.898 Ign:10 http://deb.debian.org/debian stretch/main all Packages 1.904 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages 1.989 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages 1.989 Ign:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages 2.049 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages 2.049 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages 2.108 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages 2.128 Err:6 http://security.debian.org/debian-security stretch/updates/main amd64 Packages 2.128 404 Not Found 2.168 Ign:10 http://deb.debian.org/debian stretch/main all Packages 2.248 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages 2.248 Ign:8 http://security.debian.org/debian-security stretch/updates/main all Packages 2.306 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages 2.353 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages 2.396 Ign:10 http://deb.debian.org/debian stretch/main all Packages 2.448 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages 2.496 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages 2.541 Ign:9 http://deb.debian.org/debian stretch/main amd64 Packages 2.614 Ign:10 http://deb.debian.org/debian stretch/main all Packages 2.658 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages 2.703 Ign:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages 2.760 Err:9 http://deb.debian.org/debian stretch/main amd64 Packages 2.760 404 Not Found 2.850 Ign:10 http://deb.debian.org/debian stretch/main all Packages 2.894 Ign:11 http://deb.debian.org/debian stretch-updates/main all Packages 2.938 Err:12 http://deb.debian.org/debian stretch-updates/main amd64 Packages 2.938 404 Not Found 2.946 Reading package lists... 2.967 W: The repository 'http://security.debian.org/debian-security stretch/updates Release' does not have a Release file. 2.967 W: The repository 'http://deb.debian.org/debian stretch Release' does not have a Release file. 2.967 W: The repository 'http://deb.debian.org/debian stretch-updates Release' does not have a Release file. 2.967 E: Failed to fetch http://security.debian.org/debian-security/dists/stretch/updates/main/binary-amd64/Packages 404 Not Found 2.967 E: Failed to fetch http://deb.debian.org/debian/dists/stretch/main/binary-amd64/Packages 404 Not Found 2.967 E: Failed to fetch http://deb.debian.org/debian/dists/stretch-updates/main/binary-amd64/Packages 404 Not Found 2.967 E: Some index files failed to download. They have been ignored, or old ones used instead.

Dockerfile:3

2 | 3 | >>> RUN apt-get update && apt-get -y upgrade && \ 4 | >>> apt-get install -y python3-pip \ 5 | >>> && rm -rf /var/lib/apt/lists/* 6 |

ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get -y upgrade && apt-get install -y python3-pip && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100

— Reply to this email directly, view it on GitHub https://github.com/WRI-Cities/static-GTFS-manager/issues/172, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACFLEECF3WCDZEX3V7UCOFTX63YEVANCNFSM6AAAAAA54QACQM . You are receiving this because you are subscribed to this thread.Message ID: @.***>

chyzhykio commented 1 year ago

Thank you for your reply.

I made some more changes to my Dockerfile

FROM python:3.6-slim-stretch

RUN sed -i -e 's/deb.debian.org/archive.debian.org/g' \
           -e 's|security.debian.org|archive.debian.org/|g' \
           -e '/stretch-updates/d' /etc/apt/sources.list

RUN apt-get update
RUN apt-get install -y python3-pip
RUN rm -rf /var/lib/apt/lists/*

RUN mkdir -p /app
WORKDIR /app
COPY . /app/
RUN pip3 install -r requirements.txt --user

EXPOSE 5000

CMD cd /app/ && python3 GTFSManager.py

The Docker container was built successfully with these changes to the file