Ship A Tagged Version
Part of the Introduction to Docker section of Coddy's Terminal journey — lesson 37 of 40.
Challenge
MediumFinish the project by shipping a versioned release of your image. Run these commands one after the other:
- Write the personalized Dockerfile again (
FROM alpine,COPY name.txt /name.txt,CMD ["cat", "/name.txt"]) - Build it tagged
greetapp:1.0 - List the
greetappimages to confirm the1.0tag exists
Try it yourself
Terminal
cat > Dockerfile << 'EOF'
FROM alpine
COPY name.txt /name.txt
CMD ["cat", "/name.txt"]
EOF
docker build -t greetapp .
docker run greetappAll lessons in Introduction to Docker
4Managing Containers
Naming ContainersDetached ContainersListing All ContainersStopping And RemovingRecap - Container Lifecycle10Greeting App Project
Project OverviewWrite The Dockerfile