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-compose build error at step 2/8 #262

Open
samqi opened this issue Jul 27, 2023 · 1 comment
Open

docker-compose build error at step 2/8 #262

samqi opened this issue Jul 27, 2023 · 1 comment

Comments

@samqi
Copy link

samqi commented Jul 27, 2023

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

@luffy51k
Copy link

luffy51k commented Aug 28, 2023

You need to open Dockerfile.response. Change package netcat to netcat-traditional, then run docker-compose again.

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

2 participants