Navigating the information overload with CDP12 July 2021
What is a data lake and why does your enterprise need it?1 March 2023
Docker follows Client Server Architecture. It has mainly two parts client and Server and all the transmissions happens using Restful api.
So, how can you get started with Snowpro? It’s easier than you might think:
COPY . ./App
CMD node app.js
FROM, WORKDIR, COPY, ADD, RUN, ENV, EXPOSE, USER, CMD, ENTRYPOINT etc.
Useful Docker Commands
docker build -t <tag_name> .
-t → is used to give image a tag so that it will be easy to use it later.
Note : If we don’t give a tag name then container name will be random.
docker image ls
here is one shorthand for this :
docker pull <image_name>
docker run <image_name>
If image is not present in the locally then this command will download it from hub and then run it.
This command will only show you all the running container but to see all the container :
docker ps -a
docker run -it <image_name>
-it → it will map the container’s STDIN, STDOUT, STDERR to your’s Terminals so that you can interact with it.
docker image rm <image_name1> <image_name2>
docker rmi -f $(docker images -a -q)
docker image prune
docker image <image_name> <repo_name>
docker push <repo_name>
docker image save -o <tar/zip file> <image_name>
docker image load -i <tar/zip file>
docker run -d <image_name>
docker run -d –name <container_name> <image_name>
docker logs <container_name>
docker run -d -p <host_machine_port>:<docker_port> –name <container_name> <image_name>
docker exec <container_name> <cmd>
docker start <container_name>
docker stop <container_name
docker rm <container_name>
docker rm -f <container_name>
docker system prune
docker system prune
Two docker container have separate file system and don’t share files to achieve this we have to use volumes.
docker volume create <volume_name>
docker volume inspect <volume_name>
docker run -d -v <volume_name>:/app/data <image_name>
docker cp <container_path> <host_path>
docker run -d -v $(pwd):/app <image_name>
docker-compose is generally used when we have multiple applications and we want to combine them then docker will take care of the networking and ports itself and we just have to write one single command and our application will be up and running.
Example : Like we have a frontend in React and for PostgresDB and Node.js Backend and Redis for cache. In these kind of cases we used docker-compose.
#version should be a string (number inside the double quotes)
version : “number”
build : ./frontend
build : ./backend
– DB_URL = “”
image : mongo:4.0-xenial
– volume : /data/db
name : volume
Docker Stop vs Docker Kill
docker-compose up –build