Code First Girls is a non-profit organisation that provides free tech education to women in England. I recently signed up to one of the MOOC sprints to learn more about DevOps and Docker. The programme is for an hour each monday evening with a quiz and homework. I mainly watched the recordings rather than the live sessions, but here are my notes from the course as I work through it.
Table to contents here:
What is DevOps - a way to work in a software development team. Combination of 'development' and 'operations' in order to make things more streamline/faster and efficient in the process.
The DevOps Work Cycle
Plan
Develop
Test
Deploy
Operate
and repeat
The point of the cycle is that you can go back to different stages if any issues come up.
Docker is a tool that allows us to containerise software/apps i.e. package up the code so that it can be safely moved from one environment to another. It's important because we often have dependencies (things we need to run some code) e.g. libraries, coding languages etc. Docker puts all what the code needs to run in one place that can be easily transferred to someone/something else. Coding is collaborative and being able to share code in a stable environment is important!
Docker is mainly used in the develop, test and deploy section of the DevOps cycle.
Container = the running instance that contains our software and its dependencies together. Key features:
Isolation - separate and stable
Portability - run on any system that supports Docker
Reproducibility - ensure consistent behaviour across different deployments
Benefits
Faster and simplified development - eliminate compatibility issues and reduce setup time
Consistent testing - its standardised
Image = a template of the container (a set of instructions and requirements). Images can make multiple containers with all the same configurations.
Differences between image and a container = a container is a running instance of a Docker image
Dockerfile = a text file that contains instructions for your computer on how to build a Docker image.
Really great to have an overview of words and phrases that are often thrown around or shielded by complex definitions. Having just a one hour session was a nice amount of time to go through the basics. I do feel more encouraged to carry on the course after the first session due to the pacing of the course and also the instructor being really knowledgeable and nice. The 4 question quiz was straightforward and easy to pass.
Introduction to the Command Prompt (Windows) / Terminal (Mac)
ls = list the files and folders in current directory \
cd = goes to a given directory \
mw (file original name) (file new name) = change name of file \\
rm (file name) = remove file \
docker run <image_name> = run an instance of a container from an image
docker pull <imagename> = only pulls the image rather than also starting a container
docker pull <imagename>:<tag> = tags allow you to specify a version of the image
docker rmi <imagename> = fully deletes the image
docker ps # lists all running containers and some basic info about them
docker stop <ContainerID or ContainerName> # stops the container you specify
docker rm <containername> # fully deletes the container
docker run -p <hostport>:<containerport> <image> # allows you to map your computer's port to a container port
docker ps -a
A very quick overview of some docker commands. The material was very easy but at the moment it doesn't have too much context too it (as this was just practice using command prompt).
CI/CD = continuous integration/ continuous development
Docker = a tool that allows us to containerise software/apps
Container = a lightweight virtual machine that runs an isolated application
Image = a template of the container
Dockerfile = a text file that contains instructions for your computer on how to build a Docker image.