https://github.com/jaceee/docker-golang-dep-gin
docker image for debug with go dep for vendoring and gin for hot-reloading
https://github.com/jaceee/docker-golang-dep-gin
Last synced: over 1 year ago
JSON representation
docker image for debug with go dep for vendoring and gin for hot-reloading
- Host: GitHub
- URL: https://github.com/jaceee/docker-golang-dep-gin
- Owner: jaceee
- Created: 2017-08-18T19:14:09.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-21T08:27:19.000Z (almost 9 years ago)
- Last Synced: 2025-01-20T06:24:04.649Z (over 1 year ago)
- Language: Python
- Size: 1.95 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
docker-golang-dep-gin
-----
An image to debug golang web servers using
[go dep](https://github.com/golang/dep) for vendoring and [gin](https://github.com/codegangsta/gin) for live-reloading.
The only supported setup is as follows:
```
yourpackage
|-- .gopath
| |-- yourpackage (symlink)
|-- vendor
| |-- github.com
| |-- random
| |-- library
|-- Gopkg.toml
|-- Gopkg.lock
|-- subpkg
| |-- subpkg.go
| |-- subsubpkg
| |-- subsubpkg.go
|-- main.go
```
## Usage
Run this image with your source mounted on `/go/src/app`. Use `APP_PORT`
environment variable to set the port your app listens to (defaults to 8080),
and `PROXY_PORT` to set the port gin will listen to (defaults to 3000).
```
docker run --name some-app-debug -v $(pwd):/go/src/app -e APP_PORT=8085 -p 3000:3000 jace/golang-dep-gin:latest
```
Or use a docker-compose.yml
```yaml
version: '3'
services:
server:
image: jace/golang-dep-gin:latest
volumes:
- .:/go/src/app
environment:
- "APP_PORT=8085"
ports:
- "3000:3000"
```