Skip to content

Latest commit

 

History

History
21 lines (15 loc) · 460 Bytes

README.md

File metadata and controls

21 lines (15 loc) · 460 Bytes

Example on building a minimal GO Docker container

LINUX

  1. Copy Certificate to the working dir
cp /etc/ssl/certs/ca-certificates.crt .
  1. Build the application with as a statically linked binary:
CGO_ENABLED=0 GOOS=linux go build -a --ldflags="-s" --installsuffix cgo -o main
  1. Build the Docker container
docker build -t YOURNAME/APPNAME -f ./Dockerfile .
  1. Run it docker run -d -p 3000:3000 YOURNAME/APPNAME