drf_course icon indicating copy to clipboard operation
drf_course copied to clipboard

Module_3 Docker Build Issues (M2 Pro Mac)

Open fffilps opened this issue 2 years ago • 2 comments

My setup: Macbook Pro M2.

Issue: Docker Build - Exit Code 100 due to Package 'netcat' has no installation candidate & Running Docker Issues

Error Code:

#0 2.039   netcat-openbsd 1.219-1
#0 2.039   netcat-traditional 1.10-47
#0 2.039 
#0 2.046 E: Package 'netcat' has no installation candidate
------
failed to solve: process "/bin/sh -c set -e;     apt-get update ;    apt-get -y install netcat ;    apt-get -y install gettext ;" did not complete successfully: exit code: 100

Solutions:

  1. backend/docker/docker_files/Dockerfile && backend/docker/docker_files/Dockerfile_app
  • Change
apt-get -y install netcat ;\ ---> apt-get -y install netcat-traditional ;\
  1. docker-compose-yml
  • Change Dockerfile_app ports to 5001:5001 instead of 5000:5000
  1. backend/docker/docker_files/Dockerfile
  • Change at the bottom
ENTRYPOINT ["/code/docker/entrypoints/entrypoint.sh"] ---> ENTRYPOINT ["bash", "-e", "/code/docker/entrypoints/entrypoint.sh"]

If a few other people could test wether its a good sturdy solution, we can close this.

IF better ways, make it aware to me please. Beginner Here.

fffilps avatar Jul 24 '23 19:07 fffilps

Had the same issue: image And found the same answer: Package ‘netcat’ has no installation candidate. How to fix this?

And got it working-ish:

image image

Note the missing file error at the end. I tried your solution and additionally had to run the command:

docker-compose build --no-cache

And well it worked perfectly, except for: image

drf_course-api-1  | python: 1: ENTRYPOINT: not found

Maybe the entrypoint is 'python3' and not 'python'? Or maybe it needs a flag... I'll test that later.

Anyway, nice job @fffilps

sandial1 avatar Sep 07 '23 05:09 sandial1

Works perfectly on my computer! Thank you vvvvvvvvvvery muchhhhhhh! Well done! @fffilps image

jackielics avatar Sep 15 '23 15:09 jackielics