Ryank90 / go-dep

A Docker image for building a go-dep container to manage your GoLang dependencies.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Go Dep

A docker image for the Go dependency tool

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 ryank90/go-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 ryank90/go-dep status

Install project dependencies;

$ docker run -it --rm -v path/to/app:/go/src/path/to/app -w /go/src/path/to/app ryank90/go-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!

About

A Docker image for building a go-dep container to manage your GoLang dependencies.


Languages

Language:Dockerfile 100.0%