🐳 gockerfile is a YAML Docker-compatible alternative to the Dockerfile Specializing in simple go server.
$ go get -u github.com/po3rin/gockerfile/cmd/gocker
create Gockerfile.yaml (Gockerfile supports only 3 fields)
#syntax=po3rin/gocker
repo: github.com/po3rin/gockerfile
path: ./example/server
version: v0.0.1 # default master
repo is git repository. path is path to main.go.
you can build Gockerfile.yaml with docker build
$ DOCKER_BUILDKIT=1 docker build -f Gockerfile.yaml -t po3rin/gockersample .
using as buildkit frontend.
buildctl build \
--frontend=gateway.v0 \
--opt source=po3rin/gocker \
--local gockerfile=. \
--output type=docker,name=gockersample | docker load
You can run go API container as it is.
$ docker run -it -p 8080:8080 po3rin/gockersample:latest /bin/server
$ curl localhost:8080/
Hello World