Skip to content

Packer configuration to make a Docker image for building golang programs

Notifications You must be signed in to change notification settings

rothwerx/gobuild

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

GoBuild

Packer configuration to make a Docker image for building golang programs

Packer is a great way to build Docker images. This uses Alpine + glibc (needed by Go) from frolvlad/alpine-glibc

Usage

Docker is required to be installed on the host in which you build this image, so make sure it's installed, and then install Packer

From there it's a simple packer build gobuild.json. Packer should pull down the alpine-glibc image and run the provision script to set up the Go environment.

Within the Docker container, the Go installation will be at /usr/local/go, and the $GOPATH will default to ~/go, so /root/go. Both /usr/local/go/bin and /root/go/bin will be in the $PATH.

Resulting image size is approx 362MB.

About

Packer configuration to make a Docker image for building golang programs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages