You should have a developer workstation that you can install Docker on and use to test out the examples included in this book. You will learn the most by actually trying each of the examples yourself instead of just reading over them. In addition, you should have access to at least one other, but preferably two or three other, servers to configure as a Docker swarm. These servers can be EC2 instances in AWS; or VMs on VMware Workstation or Fusion; or, worst case scenario, VMs in VirtualBox. All of the software used throughout this book is free or open source, so you should be able to try out everything you are learning here. Most of the examples will work equally well regardless of the OS you are using, and I have tried to call out the differences where appropriate. You should have an account created on https://hub.docker.com, and an account on https://github.com. All of the code samples have been tested by me, as well as by several reviewers, so if you don't get them to work, double-check the code and try again, or download the code from Packt and cut and paste it into your system, and then try again. You'll get the hang of it.
To get the most out of this book
Download the example code files
You can download the example code files for this book from your account at www.packtpub.com. If you purchased this book elsewhere, you can visit www.packtpub.com/support and register to have the files emailed directly to you.
You can download the code files by following these steps:
- Log in or register at www.packtpub.com.
- Select the SUPPORT tab.
- Click on Code Downloads & Errata.
- Enter the name of the book in the Search box and follow the onscreen instructions.
Once the file is downloaded, please make sure that you unzip or extract the folder using the latest version of:
- WinRAR/7-Zip for Windows
- Zipeg/iZip/UnRarX for Mac
- 7-Zip/PeaZip for Linux
The code bundle for the book is also hosted on GitHub at https://github.com/PacktPublishing/Docker-Quick-Start-Guide. In case there's an update to the code, it will be updated on the existing GitHub repository.
We also have other code bundles from our rich catalog of books and videos available at https://github.com/PacktPublishing/. Check them out!
Code in action
Visit the following link to check out videos of the code being run:
http://bit.ly/2Q1DbPq
Conventions used
There are a number of text conventions used throughout this book.
CodeInText: Indicates code words in text, database table names, folder names, filenames, file extensions, pathnames, dummy URLs, user input, and Twitter handles. Here is an example: "In the networks key section, we are instructing Docker to create two networks, one named frontend and one named backend."
Any command-line input or output is written as follows:
# Enable autolock on your swarm cluster
docker swarm update --autolock=true
# Adjust certificate expiry to 30 days
docker swarm update --cert-expiry 720h
Bold: Indicates a new term, an important word, or words that you see on screen. For example, words in menus or dialog boxes appear in the text like this. Here is an example: "Once the configuration has been saved, let's test the job by clicking on the Build Now link."