Show expected command
Learn the first steps of using Docker, such as:
- Finding and downloading images
- Running hello world
- Committing your changes
- Pushing an image to the repository
We try to make using Docker easy.
The best way to learn how Docker works is to use it!
This hands-on tutorial is 100% online, so you don't need to install a thing. In about 10-15 minutes you'll be familiar with the basic Docker commands.
Dockerfiles provide a simple syntax for building images and they are a great way to automate and script the images creation. If you are really serious about Docker, you should master the Dockerfile syntax.
There are several installation options. Our recommended installation path is for Ubuntu linux, because we develop Docker on Ubuntu and our installation package will do most of the work for you.
Mac, Windows and some Linux distributions cannot natively run Docker at this time so we help you setup a Ubuntu virtual machine and run Docker inside of that.
Please note that Docker is currently under heavy development. It should not be used in production (yet).
Now let's do some magic!
docker run ubuntu /bin/echo hello world
This should output 'hello world'. Just one line? Yes, but a lot has happened..
Docker did all of the following
You can also run an interactive shell session inside the container
docker run -i -t ubuntu /bin/bash
This command creates an interactive shell in a minimal ubuntu container. You will be able to use this shell just like you would any other linux machine or virtual machine. Press Ctrl-D to exit the shell.
Here are just two examples of some cool stuff people have already built with Docker. For the full list, head over to the community page