Adds a Makefile to make the virtual box creation, start and app run

reproducible.
This allows to develop PWD on a container, which is nice and also
necessary once "reverse proxy" feature is introduced.
This commit is contained in:
Jonathan Leibiusky @xetorthio
2016-11-17 12:29:08 -03:00
parent 69f9edc695
commit 60395a269a
2 changed files with 45 additions and 0 deletions

15
docker-compose.yml Normal file
View File

@@ -0,0 +1,15 @@
version: '2'
services:
web:
# use the latest golang image
image: golang
# go to the right place and starts the app
command: /bin/sh -c 'cd /go/src/github.com/franela/play-with-docker; go run api.go'
ports:
# app exposes port 3000
- "3000:3000"
volumes:
# since this app creates networks and launches containers, we need to talk to docker daemon
- /var/run/docker.sock:/var/run/docker.sock
# mount the box mounted shared folder to the container
- /go/src:/go/src