9.9.3 Docker Instructions
Docker instructions for building and publishing the Go application as container image.
9.9.3.1 Docker instructions
Building, testing and publishing of the container image using Docker.
Image build
Docker build command:
docker build -t go-hello-world
Image test
Docker run command:
docker run -p 8080:8080 -ti go-hello-world
It can be tested with a browser (http://localhost:8080/world) or using curl:
curl localhost:8080/world
Publish image to Docker Hub
docker login
docker tag go-hello-world:latest appuio/go-hello-world:latest
docker push appuio/go-hello-world:latest
Last modified April 23, 2024: Merge d34c5926ff16b8bc9f7b32ff13bf99099b781bae into c5b829fcdb844bd0ad3db1d881bbfad357cc0e73 (afbe5bd)