David Flores
#Linux #Drupal #Symfony #WebDeveloper #Silex #OpenSource
David Flores
Co-Mantainer at @DrupalConsole, Linux, Drupal, Symfony, Silex, BackEnd, Seguridad, Python, Open Source, Father ...sometimes #Nerd Speaker
david@indava.com
@dmouse
http://drupalconsole.com
https://github.com/dmouse
https://phpmexico.mx
# docker-compose.yml
web:
image: apache:latest
ports:
- 80:80
links:
- db
- cache
db:
image: postgres:latest
cache:
image: redis:latest
# docker-compose.override.yml
web:
environment:
ENV: 'dev'
ports:
- 8883:80
$ docker-compose -f docker-compose.yml up -d
# docker-compose.yml
web:
image: apache:latest
ports:
- 80:80
links:
- db
- cache
db:
image: postgres:latest
cache:
image: redis:latest
# docker-compose.prod.yml
web:
environment:
ENV: 'prod'
$ docker-compose -f docker-compose.yml -f docker-compose.prod.yml up -d
# docker-compose.yml
web:
image: apache:latest
ports:
- 80:80
links:
- db
- cache
db:
image: mysql:5.7
cache:
image: redis:latest
# docker-compose.backup.yml
backup:
image: mysql:5.7
volumes:
- ./backups:/data
links:
- db
$ docker-compose -f docker-compose.yml -f docker-compose.backup.yml run backup backup.sh
~ ./docker-machine
Create and manage machines running Docker.
Commands:
active Print which machine is active
config Print the connection config for machine
create Create a machine
env Display the commands to set up the environment for the Docker client
inspect Inspect information about a machine
ip Get the IP address of a machine
kill Kill a machine
ls List machines
provision Re-provision existing machines
regenerate-certs Regenerate TLS Certificates for a machine
restart Restart a machine
rm Remove a machine
ssh Log into or run a command on a machine with SSH.
scp Copy files between machines
start Start a machine
status Get the status of a machine
stop Stop a machine
upgrade Upgrade a machine to the latest version of Docker
url Get the URL of a machine
version Show the Docker Machine version or a machine docker version
help Shows a list of commands or help for one command
Run 'docker-machine COMMAND --help' for more information on a command.
$ docker-machine create \
--driver digitalocean \
--digitalocean-access-token $DOTOKEN \
--digitalocean-image ubuntu-16-04-x64 \
machine-name
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
ubuntu1604-docker - digitalocean Running tcp://104.236.120.71:2376 v1.11.1
eval $(docker-machine env machine-name)
docker run -d -p 8080:80 --name httpserver nginx
David Flores
Co-Mantainer at @DrupalConsole, Linux, Drupal, Symfony, Silex, BackEnd, Seguridad, Python, Open Source, Father ...sometimes #Nerd Speaker
david@indava.com
@dmouse
https://slides.com/dmouse/provisioners
By David Flores