2
2
3
3
Containers are a standard way to package an application and all its dependencies so that it can be moved between environments and run without change. They work by hiding the differences between applications inside the container so that everything outside the container can be standardized.
4
4
5
- For example, Docker created standard way to create images for Linux Containers.
6
-
7
- ## Basic Docker Commands
8
-
9
- | Action | Command |
10
- | --------------------------- | ------------------------------------------- |
11
- | Get Docker version | ` docker version ` |
12
- | Run ` hello-world ` Container | ` docker run hello-world ` |
13
- | List Running Containers | ` docker ps ` |
14
- | Stop a container | ` docker stop <container-name/container-id> ` |
15
- | List Docker Images | ` docker images ` |
16
- | Login into registry | ` docker login ` |
17
- | Build an image | ` docker build -t <image_name>:<tag> . ` |
18
- | Inspect a docker object | ` docker inspect <name/id> ` |
19
- | Inspect a docker image | ` docker inspect image <name/id> ` |
20
- | Pull an image | ` docker pull <image_name>:<tag> ` |
21
- | Push an Image | ` docker push <image_name>:<tag> ` |
22
- | Remove a container | ` docker rm <container-name/container-id> ` |
23
-
24
- ## Running Docker
5
+ For example, Podman and Docker have created a standard way to create images for Linux Containers.
6
+
7
+ ## Basic CLI Commands
8
+
9
+ === "Podman"
10
+
11
+ | Action | Command |
12
+ | ------------------------- | ---------------------------------------------------------- |
13
+ | Check Podman version | `podman --version` |
14
+ | Check host information | `podman info` |
15
+ | List images | `podman images` |
16
+ | Pull image | `podman pull <container-name/container-id>` |
17
+ | Run image | `podman run <container-name/container-id>` |
18
+ | List running containers | `podman ps` |
19
+ | Inspect a container | `podman inspect <container-id>` |
20
+ | Stop a running container | `podman stop <container-id>` |
21
+ | Kill a running container | `podman kill <container-id"` |
22
+ | Build Podman image | `podman build -t <image_name>:<tag> -f containerfile .` |
23
+ | Push image | `podman push <image_name>:<tag>` |
24
+ | Remove stopped containers | `podman rm <container-id>` |
25
+ | Remove image | `podman rmi -f <image-name>` or `podman rmi -f <image-id>` |
26
+
27
+ === "Docker"
28
+
29
+ | Action | Command |
30
+ | --------------------------- | ------------------------------------------- |
31
+ | Get Docker version | `docker version` |
32
+ | Run `hello-world` Container | `docker run hello-world` |
33
+ | List Running Containers | `docker ps` |
34
+ | Stop a container | `docker stop <container-name/container-id>` |
35
+ | List Docker Images | `docker images` |
36
+ | Login into registry | `docker login` |
37
+ | Build an image | `docker build -t <image_name>:<tag> .` |
38
+ | Inspect a docker object | `docker inspect <name/id>` |
39
+ | Inspect a docker image | `docker inspect image <name/id>` |
40
+ | Pull an image | `docker pull <image_name>:<tag>` |
41
+ | Push an Image | `docker push <image_name>:<tag>` |
42
+ | Remove a container | `docker rm <container-name/container-id>` |
43
+
44
+ ## Running the CLI
45
+
46
+ === "Local Podman"
47
+
48
+ 1. a. RECOMMENDED: Download Podman [here](https://podman.io/){target="\_blank"}
49
+
50
+ b. NOT RECOMMENDED: Brew Installation
51
+ ```
52
+ brew install podman
53
+ ```
54
+
55
+ 2. Create and start your first podman machine
56
+ ``` bash
57
+ podman machine init
58
+ podman machine start
59
+ ```
60
+
61
+ 3. Verify Podman installation
62
+ ```
63
+ podman info
64
+ ```
65
+
66
+ 4. Test it out: [Podman Introduction](https://docs.podman.io/en/latest/Introduction.html){terget="_blank"}
25
67
26
68
=== "Local Docker"
27
69
28
- 1. Install Docker Desktop
70
+ 1. Install Docker Desktop [here](https://docs.docker.com/desktop/){target="_blank"}
29
71
30
- 2. Test it out
72
+ 2. Test it out: [Getting Started with Docker](https://docs.docker.com/get-started/introduction/){target="_blank"}
31
73
32
74
=== "IBM Cloud"
33
75
@@ -51,46 +93,6 @@ For example, Docker created standard way to create images for Linux Containers.
51
93
ibmcloud cr login --client docker
52
94
```
53
95
54
- ## Basic Podman Commands
55
-
56
- | Action | Command |
57
- | ------------------------- | ---------------------------------------------------------- |
58
- | Check Podman version | ` podman --version ` |
59
- | Check host information | ` podman info ` |
60
- | List images | ` podman images ` |
61
- | Pull image | ` podman pull <container-name/container-id> ` |
62
- | Run image | ` podman run <container-name/container-id> ` |
63
- | List running containers | ` podman ps ` |
64
- | Inspect a container | ` podman inspect <container-id> ` |
65
- | Stop a running container | ` podman stop <container-id> ` |
66
- | Kill a running container | ` podman kill <container-id" ` |
67
- | Build Podman image | ` podman build -t <image_name>:<tag> -f containerfile . ` |
68
- | Push image | ` podman push <image_name>:<tag> ` |
69
- | Remove stopped containers | ` podman rm <container-id> ` |
70
- | Remove image | ` podman rmi -f <image-name> ` or ` podman rmi -f <image-id> ` |
71
-
72
- ## Running Podman
73
-
74
- === "Local Podman"
75
-
76
- 1. a. RECOMMENDED: Download Podman [here](https://podman.io/){target="\_blank"}
77
-
78
- b. NOT RECOMMENDED: Brew Installation
79
- ```
80
- brew install podman
81
- ```
82
-
83
- 2. Create and start your first podman machine
84
- ``` bash
85
- podman machine init
86
- podman machine start
87
- ```
88
-
89
- 3. Verify Podman installation
90
- ```
91
- podman info
92
- ```
93
-
94
96
<!-- -
95
97
=== "Docker on Kubernetes/OpenShift"
96
98
0 commit comments