Docker
docker commands
run-start a container
ps-list containers
stop-stop a container
rm-remove a container
images-list images
rmi-remove images
pull-download an image
exec-execute a command
run-attach and detach
docker run
run-tag
run-port mapping
run-volume mapping
inspect container
container logs
docker environment variables
set environment variables
docker run -e APP_COLOR=blue simple-webapp-color
docker run -e APP_COLOR=green simple-webapp-color
docker run -e APP_COLOR=pink simple-webapp-color
docker images
how to create my own image
Dockerfile
FROM Ubuntu # 1.OS-Ubuntu
RUN apt-get update # 2.Update apt repo
RUN apt-get install python # 3. Install dependencies using apt
RUN pip install flask # 4. Install python dependencies using pip
RUN pip install flask-mysql
COPY . /opt/source-code # 5. copy source code to /opt folder
ENTRYPOINT FLASK_APP=/opt/source-code/app.py flask run # 6. run the web server using flask command
docker build Dockerfile -t mmumshad/my-custom-app
docker push mmumshad/my-custom-app # docker registry
Docker networking



Docker storage



Docker compose

Docker registry
