Book Image

Developing with Docker

By : Jaroslaw Krochmalski, Jarosław Krochmalski
Book Image

Developing with Docker

By: Jaroslaw Krochmalski, Jarosław Krochmalski

Overview of this book

This fast-paced practical guide will get you up and running with Docker. Using Docker, you will be able to build, ship, and run many distributed applications in real time. You will start with quickly installing Docker and start working with images and containers. We will present different types of containers and their applications, and show you how to find and build images. You will learn how you can contribute to the image repository by publishing different images. This will familiarize you with the image building process and you will be able to successfully run your programs within containers. By finishing this book, you will be well equipped in deploying your applications using Docker and will have a clear understanding of concepts, techniques, and practical methods to get it running in production systems.
Table of Contents (16 chapters)
Developing with Docker
Credits
About the Author
About the Reviewer
www.PacktPub.com
Preface

Dockerfile instructions


In this section, we are going to cover Dockerfile instructions one by one. Let's begin with the instruction that should be the first one in the Dockerfile we are going to create, the FROM instruction.

FROM

The syntax for the FROM instruction is very simple. It can have three forms. It can be as simple as that:

FROM <image>

By default, Docker will use the image tagged latest. If you need to build upon different tags, you will need to add the tag name after the name of the image. The FROM instruction will take this form then:

FROM <image>:<tag>

Last but not least, you can even more precisely pick the image using its digest. As you remember from the previous chapters, images with the same tag can change in time, if their author decides so. If you like to lock your base image to the fixed version, you can specify its digest as the image name. This way your own image will be always built using the specific version of the base image, regardless of tags. To specify...