3 ms·
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-bu
by de6u99er 6y 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-builds-to-create-clean-docker-images/ https://fabianlee.org/2020/01/26/golang-using-multi-stage-bu...
[2] https://docs.docker.com/compose/compose-file/compose-file-v3/#build https://docs.docker.com/compose/compose-file/compose-file-v3...