Congrats! You and your coworkers love Docker. Docker has become an increasingly helpful tool when it comes to devops. We can now build smaller, more robust local development setups with the promise of mirroring production. One thing that still plagues many situations is how to get those containers into production and update them over time. We will explore different tools for setting up, configuring, and maintaining containers as they go live.
16. Start Small
• Build your application
• Run composer
• Run npm/bower
• Build JS/CSS
• Use the compiled output to build an image with docker build
• Push full image to private registry
SunshinePHP 2017 16
17. docker build
• Additional options to look at
• -f, --file – Specify a different filename for the Dockerfile
• --no-cache – Don’t use a cached layer
• --pull – Always pull a new version of the image
SunshinePHP 2017 17
24. Switch to the remote node
• Run docker-machine env sunshinephp2017
& "C:Program
FilesDockerDockerResourcesbindocker-
machine.exe" env sunshinephp2017 | Invoke-Expression
SunshinePHP 2017 24
25. Set up docker-compose
• Docker Compose allows multiple config files with -f
• Have a base docker-compose.yml for Production
• Add a secondary one for Development
SunshinePHP 2017 25