/backend

Primary LanguageGoMIT LicenseMIT

Docker Go Base

This repo is meant to be used as a starting point for go projects

It uses docker to compile the binaries and the main Dockerfile adds the linux binary to the busybox image to create an extremely small final image

Building

go build -o backend_linux-amd64 -tags netgo *.go
# Or
./script/build
# Or
SKIP_BUILD=1 SKIP_IMAGE=1 ./script/build -osarch=linux/amd64

-tags netgo will help you achieve static binaries :)

Running

./backend_linux-amd64
docker run --rm -ti bbbs/backend

Changing The Name

./script/change-name $GITHUB_USERNAME $PROJECT_NAME
  • John Andersen