Public Repository

Last pushed: 2 months ago
Short Description
A docker image for the Go dependency tool
Full Description

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 dep command to the container, see the dep 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-golang-dep init

Report status of dependencies:

$ docker run -it --rm -v path/to/app:/go/src/path/to/app -w /go/src/path/to/app lushdigital/docker-golang-dep status

Install project dependencies;

$ docker run -it --rm -v path/to/app:/go/src/path/to/app -w /go/src/path/to/app lushdigital/docker-golang-dep ensure

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 dep and to be honest without the need to have Golang on your host machine!

Docker Pull Command
Owner
lushdigital

Comments (0)