Development in Go, using a Docker container. Once the container is created, stay inside and run all normal go commands.
- Source code is kept on the host computer outside of the container. And so is your editor.
- Package managment provided by gb.
$ docker build -t justadam/golang-onbuild .
$ cd 1.5
$ docker build -t justadadm/golang:1.5 .
$ docker run -it --name go1.5 -v /path/to/your/go/source:/workspace justadam/golang:1.5
$ docker start -ia go1.5
Change into the pre1.5
directory.
$ docker build -t pregolang .
$ cd 1.3
$ docker build -t golang:1.3 .
$ docker run -it --name go1.3 -v /path/to/your/go/source/:/workspace golang:1.3
$ docker start -ia go1.3