# Workshop: Hello SAD Class

WARNING

  • Please prepare one folder for this Workshop

# Step 1: Create Dockerfile

Dockerfile

FROM ubuntu:20.04
CMD echo "Hello SAD Class"
1
2
  • FROM: fill your base Image >> {Image Name}:{Version}
  • CMD: What should the container do when it is created.

# Step 2: From Dockerfile to create Docker Image

docker build . -t my-image:v1 
1

# Step 3: Run Docker Container from your Image

docker image ls
1

output

REPOSITORY                 TAG             IMAGE ID       CREATED        SIZE
my-image                   v1              7f86f670d418   7 weeks ago    72.8MB
1
2
  • run
docker run my-image:v1
1

output

Hello SAD Class
1