-
app.js A simple nodejs app
-
Dockerfile This is the file needed to create a docker image
-
notes.md Contains resources I used to learn docker
Docker must be installed on your macne/environment
Follow the following commands:
Step 1: Build docker image
docker build -t docker-practice .
Step 2: Verify creation of docker image by listing all images on your system
docker image ls
Step 3: Run app
docker run ghcp2 .
List all active containers
docker ps
List all containers, including those that have stopped or exited
docker ps -a
Method 1: Remove the image using it's repo name: docker rm :
docker rm ghcp2:latest
Method 2: Remove the image by using it's image_id docker image rm <image_id>