diff --git a/Makefile b/Makefile deleted file mode 100644 index e91a018..0000000 --- a/Makefile +++ /dev/null @@ -1,26 +0,0 @@ -# Prepares the virtual box instance -prepare: - # Creates the virtual box - -docker-machine create -d virtualbox --virtualbox-boot2docker-url https://github.com/boot2docker/boot2docker/releases/download/v1.13.0-rc1/boot2docker.iso pwd && true - # Makes sure the docker daemon has the DinD image pulled - -docker-machine ssh pwd "docker pull franela/pwd-1.12.3-experimental-dind" - # Daemon should be swarm - -docker-machine ssh pwd "docker swarm init --advertise-addr $$(docker-machine ip pwd)" - # Stops to daemon to do further configurations on the box - -docker-machine stop pwd - # Adds the host GOPATH as a shared folder in the box - -VBoxManage sharedfolder add pwd --name gopathsrc --hostpath ${GOPATH}src --automount - # Do port forwaring so we can reach the app using localhost:3000 - -VBoxManage modifyvm pwd --natpf1 "localhost,tcp,,3000,,3000" - -# Starts the virtual box instance -start: - # Starts the machine - -docker-machine start pwd - # Make sure the folder where we'll mount the shared folder exists - docker-machine ssh pwd "sudo mkdir -p /go/src" - # Mount the host's GOPATH shared folder - docker-machine ssh pwd "sudo mount -t vboxsf gopathsrc /go/src" - - -.PHONY: prepare start run diff --git a/README.md b/README.md index ca378d5..51d0d01 100644 --- a/README.md +++ b/README.md @@ -9,11 +9,7 @@ A live version is available at: http://play-with-docker.com/ ## Requirements -Docker 1.13+ is required. If you're running an older version or you just want to run PWD in a VM you can use docker-machine with the following command: - -``` -docker-machine create -d virtualbox -``` +Docker 1.13+ is required. The docker daemon needs to run in swarm mode because PWD uses overlay attachable networks. For that just run `docker swarm init` in the destination daemon. @@ -21,11 +17,6 @@ just run `docker swarm init` in the destination daemon. It's also necessary to manually load the IPVS kernel module because as swarms are created in `dind`, the daemon won't load it automatically. Run the following command for that purpose: `sudo modprobe xt_ipvs` -If you are developing, there is a `Makefile` file with 2 targets that can set the whole environment for you (using docker-machine and virtual box). -Just run once `make prepare`, which will create & prepare the docker-machine environment. -Additionally, every time you want to start you environment run `make start`. -And to start the application on a container on the docker machine host, run: `eval $(docker-machine env pwd) && docker-compose up` - ## Development