Docker Certified Associate (DCA) Prep Exam 2022 with complete solution
Command to create a new swarm -Answer- docker-machine ssh && docker swarm init --advertise-addr
How to retrieve command to add swarm node -An
...
Docker Certified Associate (DCA) Prep Exam 2022 with complete solution
Command to create a new swarm -Answer- docker-machine ssh && docker swarm init --advertise-addr
How to retrieve command to add swarm node -Answer- docker-machine ssh && docker swarm join-token worker
What command lists swarm state & machines -Answer- docker-machine ssh && docker info && docker node ls
How do you add a manager to swarm -Answer- docker-machine ssh && docker swarm join-token manager
What can you expect when you execute docker run -Answer- The docker run command first creates a writable container layer over the specified image, and then starts it using the specified command.
That is, docker run is equivalent to the API /containers/create then /containers/(id)/start
What can you expect when you run multiple containers for a given image in docker swarm -Answer- When you deploy a service to the swarm, the swarm manager accepts your service definition as the desired state for the service. Then it schedules the service on nodes in the swarm as one or more replica tasks. The tasks run independently of each other on nodes in the swarm.
How do you create 3 containers in swarm -Answer- docker-machine ssh && docker service create --replicas 3 --name frontend --network mynet -p 8080:80 --constraint engine.labels.com.example.storage==ssd
frontend:latest
How can you increase the number of containers in swarm -Answer- docker-machine ssh && docker service update --replicas 6 frontend
docker-machine ssh && docker service scale frontend=6 backend=3 ##note: can do more than one service
How do you protect a docker swarm environment (and secrets within, at-rest) using a TLS encryption key -Answer- docker swarm init --autolock
docker swarm update --autolock=true
How can you manage the docker swarm encryption key -Answer- docker swarm unlock
docker swarm unlock-key
docker swarm unlock-key --rotate
[Show More]