mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
328dbd0aa2
Signed-off-by: Mary Anthony <mary@docker.com> Upding sed, adding script to avoid redirects, remove mkdos Signed-off-by: Mary Anthony <mary@docker.com> Ignoring graphics with sed Signed-off-by: Mary Anthony <mary@docker.com> Fixing kitematic image Signed-off-by: Mary Anthony <mary@docker.com> Removing draft Signed-off-by: Mary Anthony <mary@docker.com> Fixing link Signed-off-by: Mary Anthony <mary@docker.com> removing from the menu Signed-off-by: Mary Anthony <mary@docker.com> Updatiing order of project material Signed-off-by: Mary Anthony <mary@docker.com> Removing from Regsitry v2 content per Olivier Signed-off-by: Mary Anthony <mary@docker.com> tweaking the touchup Signed-off-by: Mary Anthony <mary@docker.com> Removing include; only used four places; hugo global var replace Signed-off-by: Mary Anthony <mary@docker.com> Entering fixes from page-by-page Signed-off-by: Mary Anthony <mary@docker.com>
4.7 KiB
4.7 KiB
Dockerfile tutorial
Test your Dockerfile knowledge - Level 1
Questions
What is the Dockerfile instruction to specify the base image ?
What is the Dockerfile instruction to execute any commands on the current image and commit the results?
What is the Dockerfile instruction to specify the maintainer of the Dockerfile?
What is the character used to add comment in Dockerfiles?
The right answer was
FROM
What is the Dockerfile instruction to execute any commands on the current image and commit the results?
The right answer was
RUN
What is the Dockerfile instruction to specify the maintainer of the Dockerfile?
The right answer was
MAINTAINER
What is the character used to add comment in Dockerfiles?
The right answer was
#
Congratulations, you made no mistake!
Tell the world Tweet
And try the next challenge: Fill the Dockerfile
Tell the world Tweet
And try the next challenge: Fill the Dockerfile
Your Dockerfile skills are not yet perfect, try to take the time to read this tutorial again.
You're almost there! Read carefully the sections corresponding to your errors, and take the test again!
Fill the Dockerfile
Your best friend Eric Bardin sent you a Dockerfile, but some parts were lost in the ocean. Can you find the missing parts?
# This is a Dockerfile to create an image with Memcached and Emacs installed.
# VERSION 1.0
# use the ubuntu base image provided by dotCloud ub
E B, eric.bardin@dotcloud.com
# make sure the package repository is up to date echo "deb http://archive.ubuntu.com/ubuntu precise main universe" > /etc/apt/sources.list apt-get update
# install memcached RUN apt-get install -y
# install emacs apt-get install -y emacs23
Congratulations, you successfully restored Eric's Dockerfile! You are ready to containerize the world!.
Tell the world! Tweet
Tell the world! Tweet
Wooops, there are one or more errors in the Dockerfile. Try again.
What's next?
In the next level, we will go into more detail about how to specify which command should be executed when the container starts, which user to use, and how expose a particular port.