Sign inSign up

ntboes/golang-gin

By ntboes

Updated about 11 years ago

Docker Image for Golang development with Gin

Image
2

2.8K

ntboes/golang-gin repository overview

Docker Image for Golang development with Gin

======== This docker image takes advantage of Gin in order to allow running a Go Application in a Docker container with live reloading. The image is based on the official golang:wheezy image.

Usage

In order to enable live reloading, the source folder of your app needs to be linked to /go/src/app.

Docker

Run a docker container with your app in the current folder

docker run --name some-instance-name -v $(pwd):/go/src/app ntboes/golang-gin

Crane

If you are using Crane linking the folder app works as follows

containers:
    stratus_app:
        image: ntboes/golang-gin
        run:
            volume: ["app:/go/src/app"]
            publish: ["3000:3000"]
            detach: false

Arguments

All flags after the image name in the docker command are forwarded to gin, e.g to set the port of gin to 4000:

docker run --name some-instance-name -v $(pwd):/go/src/app ntboes/golang-gin -p 4000

For further info see: Gin or gin -h.

Tag summary

Content type

Image

Digest

sha256:12db73685

Size

139.2 MB

Last updated

almost 11 years ago

docker pull ntboes/golang-gin