drf_course
drf_course copied to clipboard
Module_3 Docker Build Issues (M2 Pro Mac)
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:
- backend/docker/docker_files/Dockerfile && backend/docker/docker_files/Dockerfile_app
- Change
apt-get -y install netcat ;\ ---> apt-get -y install netcat-traditional ;\
- docker-compose-yml
- Change Dockerfile_app ports to 5001:5001 instead of 5000:5000
- 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.
Had the same issue:
And found the same answer:
Package ‘netcat’ has no installation candidate. How to fix this?
And got it working-ish:
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:
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
Works perfectly on my computer! Thank you vvvvvvvvvvery muchhhhhhh! Well done! @fffilps