Snippets for Operating Docker/Podman Containers

Take notes on some important snippets for container. Docker and Podman are interchangeable here.

Table of Contents

1. to Start a Container

A container is a lightweight and interactable “OS” defined by an image. Since containers are lightweight, in general, we can either create a new container, or restart a container.

We use docker run to start a container. The cli command is

docker run [options] image [command] [arguments]

Interactive Shell within the Container. Use the -it option. -i enables stdin; -t assigns a pseudo-TTY for shell. Therefore, -it provides interactive shell.

docker run -it image bash

Launch a Background Task.

Date: 2026-10-23 Fri

Author: ArcaLunar