Skip to content

Conversation

buchdag
Copy link
Member

@buchdag buchdag commented Apr 9, 2021

While I understand the rationale for downloading a hard coded version back when building the Go binary using multi stage Dockerfile wasn't an option, I think it's not relevant anymore and that the Dockerfile should build an image corresponding to the surrounding sources. We're currently in a strange situation where the project's Dockerfile potentially builds an image that use codes dating from a handful of commits back.

Having tagged versions of the container derived from git tags should happen through the CI instead (either GitHub Actions of DockerHub's autobuild). The version can still be passed to go build -X main.buildVersion using the VERSION build ARG.

The resultant image has been tested with nginx-proxy and is working.

The Dockerfile now builds from the actual surrounding sources
@jwilder jwilder merged commit 37de427 into nginx-proxy:master Apr 10, 2021
@buchdag
Copy link
Member Author

buchdag commented Apr 10, 2021

@jwilder unfortunately DockerHub can't do automated build for multiple archs. Do you want me to contribute a GitHub Actions worklow that will take care of that by building on GHA with buildx and pushing to DockerHub ? It'll only require that you create a token on DockerHub and add it to the GitHub repository's secrets.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants