Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Enable multi-architecture docker image builds
Previously, the Dockerfile downloaded a 'docker-gen' binary during build time. This caused a problem as it hard-coded the amd64 architecture for the image. This commit updates the Dockerfile to build the docker-gen executable from source instead of downloading a binary. This updated Dockerfile uses a multi-stage build [1]. The first stage downloads a source tarball from github and produces a binary out of it. The second stage corresponds to the old Dockerfile, with the sole change being that is fetches the binary from the first stage instead of GitHub. This has the advantage that the build process no longer assumes a certain architecture and enables building the image for any architecture that both the golang and alpine base images support. [1] https://docs.docker.com/develop/develop-images/multistage-build/
- Loading branch information