I’ve dockerized your application, see https://github.com/lutzhorn/GoSystemOfEquations/tree/dockerize
Noteworthy things:
- I’ve removed the
/src
directory. - The Go application is compiled to a static binary
app
, seeMakefile
. - The Docker image starts from
scratch
, no OS is used. - The static binary and the template directory are copied to the empty image, see
Dockerfile
.
Build everything using make
:
$ make all
The build container can be run like this:
$ docker run -p 8080:8080 --rm app
I did not publish the image to a Docker repository and I did not try to run it at Azure.