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 #Test Yourself ## Test your Dockerfile skills - 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 shortly. Follow us on twitter
Follow @docker

In the meantime, check out this blog post by Michael Crosby that describes Dockerfile Best Practices.

Back to the Docs!