Docker braindump

A collection of my learnings, notes and musings on Docker.

These are currently random notes and are not much help to anybody yet. They will get tidied as I add to the page.

Docker Swarm

Docker swarm secrets

From inside a docker swarm manager node, there are two ways of creating a secret.

Using a string value:

printf <your_secret_value> | docker secret create your_secret_key -

Using a file path:

docker secret create your_secret_key ./your_secret_value.json

Docker swarm secrets are saved, encrypted, and are accessible to containers via a filepath:

/run/secrets/your_secret_key.

Posts to digest

https://www.bretfisher.com/docker-swarm-firewall-ports/

https://www.bretfisher.com/docker/

https://www.digitalocean.com/community/tutorials/how-to-set-up-laravel-nginx-and-mysql-with-docker-compose

Been learning to use Docker Swarm

Despite not yet managing to get what I have learnt implemented, I have nonetheless took on board some good concepts around docker and docker swarm

After getting half-way through a Docker Mastery series on Udemy, I decided I would like to move my WordPress website, this one, to using a 3-node swarm.

After a few days of editing and re-arranging my docker-compose.yml file (the local dev configuration file that can also be used for starting up a swarm since compose version 3.3) I have decided to just keep my website hosted on its single regular server. (Although I had already moved the database to its own dedicated server).

Despite the fact that I haven’t actually managed to move over to using a swarm (and to be honest it isn’t even needed for me) I have managed to dive into a bunch of concepts around Docker and its Swarm component and feel that I have added a few new things to me dev toolkit.

I think I will definitely be putting together a little demo in a swarm across three separate servers. But for now I will keep my website settled as it is. 😀

What I have learned – or rather reminded myself of, whilst sat in at home during this damn isolation, is that it is important to keep looking into complimentary technologies around my everyday development skill set.