dockerfile: Labels, Alpine, & Multi-stage builds #151
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR includes the following changes:
The Maintainer Label
The
MAINTAINER
keyword is deprecated, and the Dockerfile has been updated to useLABEL maintainer
instead.Alpine & Multi-stage builds
Two changes were made to the Dockerfile in order to reduce its size:
The above changes reduces the size of the image from 1.72GB to 465MB.
This patch has been tested with the vSphere provider (#150) and verified that the switch to Alpine does not impede at least the standard Terraform binary or the Terraform provider binaries for: vSphere, AWS, Gzip+Base64.
Please note that I made myself the maintainer for the
golang
stage, while @denverwilliams is still listed as the maintainer for the primary stage. I am more than happy to revert this part of the change. I only did it to indicate who should support the build stage.Testing
This change should be tested with all of the providers before being considered for merge:
cc @denverwilliams