Docker and Docker Compose
My clients docker run command was getting so long and hard to manage for developers to use on their local machines and missed using vagrant up.
Now we’ve cut it down to
## spin up the container docker-compose up -d
We don’t run a sshd service on the box for security reasons, so this is how developers get in to run tests etc..
docker-compose exec default /bin/bash
And anyone have problems with out of date containers are advised to run this.
## get the latest box docker-compose pull
Full command line
## get the latest box docker-compose pull ## spin up the container docker-compose up -d ## to get into bash (default is the name of the service in docker-composer.yml) docker-compose exec default /bin/bash
docker-compose.yml
version: '2' services: default: image: namespace/technology:latest ports: - "8080:80" volumes: - .:/app - ~/.ssh/id_rsa:/root/.ssh/id_rsa tty: true
Gareth