Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Continuous Delivery with Docker and Jenkins

You're reading from   Continuous Delivery with Docker and Jenkins Delivering software at scale

Arrow left icon
Product type Paperback
Published in Aug 2017
Publisher Packt
ISBN-13 9781787125230
Length 332 pages
Edition 1st Edition
Tools
Arrow right icon
Author (1):
Arrow left icon
Rafał Leszko Rafał Leszko
Author Profile Icon Rafał Leszko
Rafał Leszko
Arrow right icon
View More author details
Toc

Table of Contents (10) Chapters Close

Preface 1. Introducing Continuous Delivery FREE CHAPTER 2. Introducing Docker 3. Configuring Jenkins 4. Continuous Integration Pipeline 5. Automated Acceptance Testing 6. Configuration Management with Ansible 7. Continuous Delivery Pipeline 8. Clustering with Docker Swarm 9. Advanced Continuous Delivery

Docker container states

Every application we've run so far was supposed to do some work and stop. For example, we've printed Hello from Docker! and exited. There are, however, applications that should run continuously such as services. To run a container in the background, we can use the -d (--detach) option. Let's try it with the ubuntu image:

$ docker run -d -t ubuntu:16.04

This command started the Ubuntu container but did not attach the console to it. We can see that it's running using the following command:

$ docker ps
CONTAINER ID IMAGE COMMAND STATUS PORTS NAMES
95f29bfbaadc ubuntu:16.04 "/bin/bash" Up 5 seconds kickass_stonebraker

This command prints all containers that are in the running state. What about our old, already-exited containers? We can find them by printing all containers:

$ docker ps -a
CONTAINER ID IMAGE COMMAND...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime