# 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
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
- dot means where is your Dockerfile ( . == current directory )
- -t = tag, it looks like a name. You should fill version too.(default is latest)
# Step 3: Run Docker Container from your Image
- check your Image Image command (opens new window)
docker image ls
1
output
REPOSITORY TAG IMAGE ID CREATED SIZE
my-image v1 7f86f670d418 7 weeks ago 72.8MB
1
2
2
- run
docker run my-image:v1
1
output
Hello SAD Class
1