Install Sqreen on a Docker Go App¶ Quick Start¶ This Go app example allows to create a docker image of a Go web server that serves "Hello HTTP!". The following Dockerfile examples show-case multi-stage docker images in order to separate the build environment and the tools it needs, from the production application image. They all use the official golang docker image which contains by default everything required to compile a Go program with Sqreen. Building the docker image examples¶ Building the debian docker image example¶ The Dockerfile of this example can be found in the debian/ subdirectory. It shows how to produce a debian docker image with the Go web server protected by Sqreen. Build the docker image and tag it with the image name hello-sqreen by doing: examples/docker$ docker build -t hello-sqreen -f debian/Dockerfile . Building the Alpine docker image example¶ The Dockerfile of this example can be found in the alpine/ subdirectory. It shows how to produce an alpine docker image with the Go web server protected by Sqreen. Build the docker image and tag it with the image name hello-sqreen by doing: examples/docker$ docker build -t hello-sqreen -f alpine/Dockerfile . Building the scratch docker image example¶ The Dockerfile of this example can be found in the scratch/ subdirectory. It shows how to produce a docker from scratch with the Go web server protected by Sqreen. Build the docker image and tag it with the image name hello-sqreen by doing: examples/docker$ docker build -t hello-sqreen -f scratch/Dockerfile . Running the docker image¶ Once you have built your hello-sqreen docker image by following one of the previous docker build examples, you can then run it. Create the application on our dashboard and get its credentials at https://my.sqreen.com/new-application Run the docker image with Sqreen by at least passing the Sqreen application token: examples/docker$ docker run -t -p 8080:8080 -e SQREEN_TOKEN="your token" -e SQREEN_APP_NAME="your app name" --rm hello-sqreen See the configuration for the full list of configuration options. Congratulations, your are running a Go web server now protected by Sqreen! Detailed Installation Instructions¶ The detailed installation instructions required to setup Sqreen in a docker image are the same as the general setup instructions.