Mount volumes to persist data in local & initialize database in Docker

When a docker container is deleted, relaunching it from the image will start a fresh new container without any of the changes made in the previously running containerThis happens because when we create a new container from an image, we add a new writable layer on top of the underlying stack of layers present in … Continue reading Mount volumes to persist data in local & initialize database in Docker

Key Docker Commands

Pull docker image from repository to local : docker pull <imageName> example docker pull busyboxRun a docker container : docker run <imageName> example docker run busyboxIf there is nothing to execute docker will exit when the process terminatesTo view all containers in local : docker ps -a To view all running containers: docker psTo stop … Continue reading Key Docker Commands

DockerFile , Docker Image, Docker Container

Dockerfile is a text file that contains the instructions needed to create a new container image. Docker engine reads the instructions from top to bottom. It contains a bunch of instructions which informs Docker HOW the Docker image should get built. It is like the script of a movie which contains details on how the … Continue reading DockerFile , Docker Image, Docker Container

Import data from local to postgreSQL and pgAdmin4 running on Docker

Copy the csv file to a local folderOpen pgAdmin4 and select the table where you want to import the data intoRight click and select Import/Export Select the Import option and click on three dots for file name Click on the icon highlighted in red which is to drag file Drag the file that you want … Continue reading Import data from local to postgreSQL and pgAdmin4 running on Docker