GithubHelp home page GithubHelp logo

piroki3927 / docker-golang-gin Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ntboes/docker-golang-gin

0.0 1.0 0.0 147 KB

A Docker image for a development environment with go and gin

License: MIT License

Shell 100.00%

docker-golang-gin's Introduction

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

Docker Compose

If you are using Docker Compose linking the folder app works as follows

web:
  image: ntboes/golang-gin
  command: gin
  ports:
   - "3000:3000"
  volumes:
   - app:/go/src/app

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.

docker-golang-gin's People

Contributors

adriantoine avatar ntboes avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.