part of OS that is loaded into memory during system boot • Manages IPC and process management ( Manages hardware directly ) • Manages I/O, Memory • Interacts with underlying hardware User processes: • Interacts with Kernel using system calls (Manages hardware through the kernel) • Runs in the Userspace of the system @gritncompassion
to package an app and its dependencies together into an image • You can run multiple containers on the same machine and share the same kernel, each running an isolated process in the user space • cross-platform support for Mac, Windows, Linux @gritncompassion
• You downloaded ruby on your machine • You downloaded rails on your the machine • Make an app • Assume the machine you are deploying to, also has the same ruby version and rails version installed and then you can deploy a working app @gritncompassion
the docker image with ruby and rails installed with host OS • Create a new image with your app and the original image and deploy the new image @gritncompassion
new image for the app • FROM: • sets the base image for subsequent instructions; • a Dockerfile starts with a FROM instruction • Can appear multiple times within a single Dockerfile to create multiple images • ARG: to declare variables • WORKDIR: specifies the working directory for the subsequent RUN, CMD, COPY and ADD that follow it • ENV: is used to setup environment variables @gritncompassion
on top of an existing image and as a result creates a new image • EXPOSE: Specifies to the Docker Daemon that container listens on the specified port • CMD: Execute the command; only one per dockerfile • COPY: copies files, directories from src and adds them to the filesystem of the image @gritncompassion
language you are most comfortable in) • Build your docker image and run them • Try to Curl and see what you get • docker ps and look at the port mappings • docker stop to stop a container • docker start to start a container @gritncompassion
machine by the container • Volumes : • managed by docker • can be created and managed outside the scope of a container • Mounts: • dependent on the directory structure of the host machine @gritncompassion