Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for releasing an offical docker image #260

Merged
merged 2 commits into from
May 12, 2020

Conversation

rogchap
Copy link
Contributor

@rogchap rogchap commented May 11, 2020

This adds a docker image plus the relevant docker goreleaser/travisci configuration.

To test locally run:

goreleaser --snapshot --skip-publish --rm-dist
docker run vektra/mockery --version

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 the go 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 installing Go onto the scratch image rather than using alpine.

@LandonTClipp We will need to add the secrets for travis: DOCKER_USERNAME and DOCKER_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

Copy link
Collaborator

@LandonTClipp LandonTClipp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fantastic, I will merge this in the US morning tomorrow once I get the docker credentials figured out. I don't believe we have an existing login for docker so I will get that created.

@LandonTClipp
Copy link
Collaborator

I need to get added to the vektra dockerhub org before we can merge this, I've emailed @evanphx to get access to it.

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.

Publish docker image
2 participants