Hacker News new | ask | show | jobs
by de6u99er 1902 days ago
Great effort!

But your docker files are not really related to the source code. Your Dockerfile expects a prebuilt binary, and your docker-compose file a pre-built image from a container-registry (usually Dockerhub).

It would be better to do building of the project in a multi-stage Dockerfile [1], and use the local Dockerfile [2] instead of a pre-built image from Dockerhub.

[1] https://fabianlee.org/2020/01/26/golang-using-multi-stage-bu...

[2] https://docs.docker.com/compose/compose-file/compose-file-v3...