Difference between revisions of "Docker Essentials 5 - Making Containers Persist"

From LearnLinux.tv Wiki
Jump to navigation Jump to search
(Created page with "== Overview == Welcome to my Docker Essentials series, which teaches you the basics you'll need to know in order to get started with Docker. In this video, we'll look at ways...")
 
 
Line 8: Line 8:
 
|}
 
|}
  
== Coming Soon ==
+
== Commands used in this video ==
Coming soon!
+
==== Launch an Ubuntu container, and attach to its shell ====
 +
We've already run this container in the previous video, so the command is used again as a reminder. However, the command is simplified from the previous video.
 +
  docker run -it ubuntu
 +
 
 +
==== Launch an Ubuntu container in a 'detached' state ====
 +
The following command will launch an Ubuntu container similar to before, but will launch it in the background:
 +
  docker run -it -d ubuntu
 +
 
 +
==== Launch an Ubuntu container, but have it relaunch if stopped ====
 +
docker run -d -it --restart unless-stopped ubuntu

Latest revision as of 10:11, 18 January 2021

Overview

Welcome to my Docker Essentials series, which teaches you the basics you'll need to know in order to get started with Docker. In this video, we'll look at ways we can make containers persist.

Relevant Links
Original Video

Commands used in this video

Launch an Ubuntu container, and attach to its shell

We've already run this container in the previous video, so the command is used again as a reminder. However, the command is simplified from the previous video.

 docker run -it ubuntu

Launch an Ubuntu container in a 'detached' state

The following command will launch an Ubuntu container similar to before, but will launch it in the background:

 docker run -it -d ubuntu

Launch an Ubuntu container, but have it relaunch if stopped

docker run -d -it --restart unless-stopped ubuntu