DEV Community

loading...

#100DaysOfCloud | Day 4

daltonincloud profile image DaltonInCloud ・2 min read

What Did I learn -

Today I went over the process of creating Docker volumes with the docker volume create <NAME> command as well as removing and pruning, similar to previous docker commands, they look like docker volume prune or docker volume rm <NAME>. I found the options I can add for creating a volume would be specifying a volume driver name with -d, or setting the metadata for volume with --label list, or set specific driver options with -o. Also today I learned about the advantages to bind mounts is because it allows us to make a change to a file, restart the container then the container to pick up on that change, we do not have to go and rebuild the image and redeploy. Another thing I thought was a great takeaway was from Entrypoint and cmd differences in Dockerfiles, an entrypoint is making the container executable and concrete, then when you add cmd (commands) they are appended to the end of the entrypoint, if you want to write over the entrypoint you need a new entrypoint flag.

What Did I Do -

Today it was all labs, so I guess for what did I do, I can mention I took a dockerfile image and I created a .dockerignore file, with this I specified specific directories as well as wildcard * file types such as .git that I want to cut out to ensure the image is as lean as possible. We verified this by running a docker container exec <NAME> ls -la /WORKINGDIRECTORY and verified what content was missing.

For tomorrow -

Up next we are going to be working more on Docker (We will go back to AWS Console soon). I want to get to Docker Swarm tomorrow in my studies, so hopefully depending on the time I am allocated I get the chance to get there.

Discussion (0)

pic
Editor guide