Open samqi opened 1 year ago
docker-compose up fails with netcat has no installation candidate error:
Step 2/8 : RUN apt-get update && apt-get install -y --no-install-recommends netcat && rm -rf /var/lib/apt/lists/* ---> Running in bf7b1aeab946 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB] Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB] Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB] Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8906 kB] Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [4732 B] Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [49.1 kB] Fetched 9211 kB in 4s (2217 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Package netcat is a virtual package provided by: netcat-openbsd 1.219-1 netcat-traditional 1.10-47 E: Package 'netcat' has no installation candidate The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends netcat && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100 ERROR: Service 'response' failed to build : Build failed 1 MYNAME@MYLINUXBOX-dev:~/workspaces/response/demo$ docker-comapose up -d && docker-compose logs -f Building response Sending build context to Docker daemon 32.26kB Step 1/8 : FROM python:3.7-slim ---> 70ec6f685b6f Step 2/8 : RUN apt-get update && apt-get install -y --no-install-recommends netcat && rm -rf /var/lib/apt/lists/* ---> Running in 38ea96b69628 Get:1 http://deb.debian.org/debian bookworm InRelease [151 kB] Get:2 http://deb.debian.org/debian bookworm-updates InRelease [52.1 kB] Get:3 http://deb.debian.org/debian-security bookworm-security InRelease [48.0 kB] Get:4 http://deb.debian.org/debian bookworm/main amd64 Packages [8906 kB] Get:5 http://deb.debian.org/debian bookworm-updates/main amd64 Packages [4732 B] Get:6 http://deb.debian.org/debian-security bookworm-security/main amd64 Packages [49.1 kB] Fetched 9211 kB in 4s (2442 kB/s) Reading package lists... Reading package lists... Building dependency tree... Reading state information... Package netcat is a virtual package provided by: netcat-openbsd 1.219-1 netcat-traditional 1.10-47 E: Package 'netcat' has no installation candidate The command '/bin/sh -c apt-get update && apt-get install -y --no-install-recommends netcat && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100 ERROR: Service 'response' failed to build : Build failed
Probably not relevant, but am on Ubuntu 22.04 LTS
You need to open Dockerfile.response. Change package netcat to netcat-traditional, then run docker-compose again.
Dockerfile.response
netcat
netcat-traditional
docker-compose up fails with netcat has no installation candidate error:
Probably not relevant, but am on Ubuntu 22.04 LTS