Understanding how an Operating System (OS) is made up
There are two main components / layers
OS Kernal → Core of every OS
OS Application Layer → Software apps such as google chrome, MS word, etc
Docker virtualizes the OS Application Layer, while using the host kernal
VM virtualizes the application layer AND the OS Kernal.
Sizes of the docker packages / images are much smaller as they don’t have to bring in their own Operating Systems!
Docker containers are much faster to start (uses host OS, and just boots up the application layer on top of it )
VM is better in terms of compatibility → you can run the VM on ANY OS, but docker can’t run linux apps on a windows OS
Installation
Install from here:
This comes with Docker engine (Server, Manages images and containers), Docker CLI - Client (to interact with the docker Server, execute containers.. starting/stopping, deleting etc), GUI Client (same as CLI)
****Recall that docker allows us to package everything into an artifact which can be easily shared and moved (kind of like a zip folder, or jar file, etc)
FROM python:3.11-slim
RUN pip install pandas
WORKDIR /appCOPY pipeline.py pipeline.pyCOPY wine_data.csv wine_data.csv
# Make port 80 available to the world outside this container
EXPOSE 80
ENTRYPOINT [ "python", "pipeline.py" ]