Introduction Today we will be investigating different ways docker can be used by running through simple examples that contain realistic tasks that are performed involving docker. I will be running through these examples in the following git respository.
Fetch and Configure Let’s start by obtaining all ‘meta’ layers that we want to use recipes from. Choose a directory that you have plenty of space.
git clone --recurse-submodules \ git@github.
Yocto Application Containers from SCRATCH Yesterday I wrote about Using Yocto Project for Docker FROM scratch , but I quickly realized it is hard to iterate quickly with this workflow. As I added support for python-connexion I generated a fresh container image at least 10 times.
Deploying Image built from Dockerfile I provisioned my RPI 3 with resin-os downloaded from resin.io and it automatically loaded my existing application on first boot. I want to make sure the docker images are as similar as possible; so I slightly modified the dockerfile and pushed the changes to resin which will handle deploying to my devices.
Yocto and Docker Yocto Project is an amazing way to build a Linux System from the ground up. It uses an amazing build system that can build and install practically any application.
Using Docker - No plugins required Last time I investigated using Docker inside the “master” container. It was pretty cool, but it was inconvenient when directories needed to be mounted to the containers.
Avoid Docker-in-Docker Using Docker-in-Docker for your CI or testing environment? Think twice. by @jpetazzo explains why the DinD approach is bad for CI, and how using an alternative approach will allow the docker container to create sibling containers rather than child containers.
Clean up, before I get messy I have been running a lot of different docker containers, and often forgetting to use --rm. So I pruned my system: docker system --prune as recommended by this answer on StackOverfow.