Add support for releasing an offical docker image #260
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 adds a docker image plus the relevant docker goreleaser/travisci configuration.
To test locally run:
To test more than just the version you will need to mount your volume:
docker run -v "$PWD":/src -w /src vektra/mockery -all
Note: I originally used a
Scratch
base image, which puts the image around 6MB... but mockery makes use of thego
command (go list
etc), so I need to use an image with Go installed. This bumped the image to 375MB!! It's not a major problem as most people will have the Golang base imaged cached, but this could slow down peoples CI for downloading a larger image.2 future improvements would be to remove the need for executing
go
commands and installingGo
onto the scratch image rather than using alpine.@LandonTClipp We will need to add the secrets for travis:
DOCKER_USERNAME
andDOCKER_PASSWORD
I have presumed that there is/would be a docker repo for user
vektra
? We can change if needed.I have not updated the README, as I think it would be best to get this CI pipeline confirmed working then update to suggest docker. I would recommend that for CI people use the docker version.
Closes #180