December 2017
Intermediate to advanced
468 pages
13h 12m
English
This section describes a few common ways to build Docker images. As per Alex Collins (https://alexecollins.com/developing-with-docker-building-patterns/), there are several choices: scratch + binary, language stack, and distribution+ package manager. The scratch + binary - scratch is the most basic base image and it does not contain any files or programs at all. We must build a standalone binary application to use this. Here is an example. Firstly, we will build a standalone binary application using Docker. The steps are as follows:
package mainimport "fmt"// this is a commentfunc main() { fmt.Println("Hello World")}Read now
Unlock full access