BoxBoat Blog
Service updates, customer stories, and tips and tricks for effective DevOps
Docker QuickStart Tutorial
by David Widen | Wednesday, Jun 7, 2017 | Docker Education
So you want to start using Docker? You've come to the right place! Docker is software that lets you build, ship, and run any application, anywhere by packaging your code with its dependencies in a platform independent “container” (hence the container ship). It is extremely useful for students, small developers, and even enterprise production environments. However, this guide is not about what Docker is, so check out these links if you want more information:
- https://www.docker.com/what-docker
- https://en.wikipedia.org/wiki/Docker_(software)
- http://www.zdnet.com/article/what-is-docker-and-why-is-it-so-darn-popular/
This is the absolute fastest, simplest Docker Quickstart guide that you will find on the Internet. During this guide, we will install Docker, and then stand up a web server in less than 5 minutes. Technically, you only need to execute 2 commands (although a third is recommended as a sanity check). There is obviously a lot more to Docker than this guide, and I would encourage you to find out more. We will publish several articles detailing exactly what Docker is, and how it can help your team.
Prerequisites
The only 2 prerequisites required for this Docker QuickStart Guide are:
- You have a computer that runs Linux
- **sudo **(it's alright if you don't know what this is)
If your computer doesn't run Linux, install VirtualBox and then create an Ubuntu Virtual Machine. Now you have a computer that runs Linux with sudo!
Install Docker
Installing Docker is extremely simple, just run the following command in your shell:
curl -SLf https://get.docker.com/ | sh
After this finishes running, Docker is installed! To verify that everything is working properly, execute the following command:
sudo docker --version
Run Docker
We will now run Nginx, a widely-used web server, inside of Docker.
sudo docker run -d -p 8080:80 nginx
That's it! To verify that Nginx is running correctly, open up your web browser and enter localhost:8080. You should see the default Nginx landing page.
Docker QuickStart Guide Recap
To recap, we just installed Docker and launched a Docker container running Nginx in less than 5 minutes. Docker is extremely useful software that is very easy to setup. If you want to learn more, feel free to contact us and also check out the services that we offer.