jobs uses mage a magefile.go to run "jobs" both locally and within a container.
We support a more flexible container, dev.Dockerfile, and smaller and more secure container, Dockerfile.
Finally, we use GitHub Actions Workflows to build and push our container image to GitHub Packages Container Registry.
Mage targets prefixed with docker:*
are designed to help our
local "inner loop" during development and testing.
Common use cases include:
- Running the resulting container image on a serverless platform (e.g. Azure Container Apps), on Kubernetes, or a VM.
- Cloning and running mage directly, or pre-compiling a binary, to run on remote compute such as a VM.
$ mage
Targets:
docker:build BuildDev builds the container image, "jobs", with --no-cache and Dockerfile which builds a static binary and multi-stage builds to utilize a distroless image
docker:buildDev builds the container image, "jobs", with --no-cache and dev.Dockerfile which uses the golang:latest image, installs mage and vim, for more interactive development
docker:run runs the jobs container with the mage target
goodbye is an alternative mage target we can call
hello is our default mage target which we also call by default within our Docker container