let’s talk about the new Docker version 1.13. I’am a huge fan of this tiny piece of software. We run 90% of our applications inside Containers. Ok only services not used to persist any kind of data .. but nearly everything else.
So last week Docker announced Version 1.13 with some really nice new features. The most important features for my daily work are following in the next few lines. The full changelog can be found at GitHub.
For those using a Mac, you can upgrade to lastest version via Homebrew.
Deployments to the Docker swarm with docker-compose
You can now use “docker-compose.yml” files to deploy services to an native Docker swarm. Currently i’am not using a swarm, but when i have to use one, than this is one of the most important changes in terms of usability.
Together with this feature, we can now use a new version of docker-compose files with version 3. You can find a full list of supported settings for services in the docs.
Manage your Secret in/with Docker swarm
Now you can set Secrets like credentials for your Docker swarm services, i wish those would work with none swarm deployments (-:
- docker secret create
- docker secret inspect
- docker secret ls
- docker secret rm
If you run this command, your deployed service is able to access the shared secret! To make this possible, Docker is creating a new mount point inside your Container: /run/secrets/
For example, use a piece of PHP code to open the file at: “/run/secrets/admin-password” and pass it to your login functions.
Cache for building images
One of those features my dev friends will love.. you are now able to set a image for usage as cache, while building a new image. Very important for CI/CD Pipelines and “faster” deployments.
New Docker CLI commands
Wooohooo… 2 new commands i will use everyday from now on!
With this one, you can see the used space from Containers and Images on your Docker-Host.
In the past i have used some bash scripts to delete old Volumes, Networks, unused Images and stopped Docker Containers. With Docker 1.13 we can use one single command to clean up the mess on our Hosts!!
If you are afraid to clean up all those things, you can use several commands to delete only Containers .. or Images …
- docker container prune
- docker image prune
- docker volume prune
- docker network prune
More structure at common Docker commands
Docker has a new structure for the common CLI Commands.. the old ones are still working, but i am sure they will remove them in the future.
I hope you have enjoyed this short article, sorry for the terrible english .. not my mother tongue. If you like the same in german, come on and hit my blog.
By the way, from time to time I will create some more of those, so follow me on twitter: @ophasnoname