page_title: Docker images test page_description: How to work with Docker images. page_keywords: documentation, docs, the docker guide, docker guide, docker, docker platform, virtualization framework, docker.io, Docker images, Docker image, image management, Docker repos, Docker repositories, docker, docker tag, docker tags, Docker Hub, collaboration Back #Dockerfile tutorial ## Test your Dockerfile knowledge - Level 2 ### Questions:
What is the Dockerfile instruction to specify the base image?

Which Dockerfile instruction sets the default command for your image?

What is the character used to add comments in Dockerfiles?

Which Dockerfile instruction sets the username to use when running the image?

What is the Dockerfile instruction to execute any command on the current image and commit the results?

Which Dockerfile instruction sets ports to be exposed when running the image?

What is the Dockerfile instruction to specify the maintainer of the Dockerfile?

Which Dockerfile instruction lets you trigger a command as soon as the container starts?

### Fill the Dockerfile
Your best friend Roberto Hashioka sent you a Dockerfile, but some parts were lost in the ocean. Can you find the missing parts?
# Redis
#
# VERSION       0.42
#
# use the ubuntu base image provided by dotCloud
  ub
MAINT Ro Ha roberto.hashioka@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 wget (required for redis installation) apt-get install -y wget
# install make (required for redis installation) apt-get install -y make
# install gcc (required for redis installation) RUN apt-get install -y
# install apache2 wget http://download.redis.io/redis-stable.tar.gz tar xvzf redis-stable.tar.gz cd redis-stable && make && make install
# launch redis when starting the image ["redis-server"]
# run as user dameon daemon
# expose port 6379 6379

## What's next?

Thanks for going through our tutorial! We will be posting Level 3 in the future. To improve your Dockerfile writing skills even further, visit the Dockerfile best practices page. Back to the Docs!