Sign inSign up

lushdigital/docker-govendor

By lushdigital

•Updated over 9 years ago

A docker image for vendoring Golang dependencies.

Image
0

2.4K

lushdigital/docker-govendor repository overview

This image will allow you to install the dependencies required for your Golang application and vendor them. For more information on how vendoring works with Golang see their wiki⁠.

⁠Usage

Simply run a container with this image and map the path to your Golang app as a volume, and set the working directory.

You can then pass any govendor command to the container, see the govendor repo⁠ for more information.

⁠Examples

Initialise the vendor folder:

$ docker run -it --rm -v path/to/app:/go/src/path/to/app -w /go/src/path/to/app lushdigital/docker-govendor init

List all dependencies:

$ docker run -it --rm -v path/to/app:/go/src/path/to/app -w /go/src/path/to/app lushdigital/docker-govendor list

Add missing dependencies:

$ docker run -it --rm -v path/to/app:/go/src/path/to/app -w /go/src/path/to/app lushdigital/docker-govendor fetch +missing

⁠Why not use the GOPATH?

Sure you can use your GOPATH to manage dependencies on your local machine and most of the time it will work fine. But there are cases where this may not work, for example if your Golang application is part of a monolithic repo⁠ (outside of the GOPATH) with apps in other languages.

Basically put this image allows you to install your Golang depencies without the need to go get, without the need to install govendor and to be honest without the need to have Golang on your host machine!

Tag summary

Content type

Image

Digest

Size

106.6 MB

Last updated

over 9 years ago

docker pull lushdigital/docker-govendor