Sample "Hello world" containerized web server written in GO and the tools of alpine:
- golang:1.20.4 https://hub.docker.com/_/golang
- alpine 3.17.2 https://hub.docker.com/_/alpine
This application is available as two OCI images on Docker Hub, which respond to requests with different version numbers:
- perteghella/hello-shell:1.0
- perteghella/hello-shell:2.0
The images are based on https://github.com/GoogleCloudPlatform/kubernetes-engine-samples/tree/main/hello-app
- Multi architecture build
- linux/amd64
- linux/arm64
- Minimal size due to multistage build
- Multiple tag to test the migration to different version of deployment
Download the proper tagged image docker pull perteghella/hello-shell:TAG
Run as daemon exposing port 8080 on localhost port 8000
docker pull perteghella/hello-shell:1.0
docker run -d -p 8000:8080 perteghella/hello-shell:1.0
Verify that the server is running and respond
curl http://127.0.0.1:8000
Attach to shell using
docker exec -it CONTAINER-ID /bin/sh
Source on Github https://github.com/Perteghella/hello-shell
docker buildx build --platform linux/amd64,linux/arm64 --tag perteghella/hello-shell:1.0 --push .