O'Reilly logo

Infrastructure as Code (IAC) Cookbook by Pierre Pomes, Stephane Jourdan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Docker usage overview

This section is an introduction to Docker for newcomers, and can be used as a refresher for others. We'll see how to quickly use Docker to achieve some tasks such as executing an Ubuntu container or networked webserver, sharing data with a container, building an image, and accessing a registry other than the default one.

Getting ready

To step through this recipe, you will need a working Docker installation.

How to do it…

We'll quickly manipulate Docker, so we're up and running with some basic usage.

Running Bash in an Ubuntu 16.04 container

To execute /bin/bash in an Ubuntu container, tag 16.04 (ubuntu:16.04). Our environment will be interactive (use -i) and we want a pseudo-terminal to be allocated (use -t). We want the container ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required