summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorValentin Rothberg <vrothberg@suse.com>2018-08-30 13:05:37 +0200
committerAtomic Bot <atomic-devel@projectatomic.io>2018-08-30 16:51:56 +0000
commit1c0cd0796abd4230dbab1f7ed33212c78ecce11f (patch)
tree63d0740d08e4a6fea0f4178f4107bdfd923e146c /docs
parent1243bfa6f14ed6cfb21e7db965e52bb7ddafd1f0 (diff)
downloadpodman-1c0cd0796abd4230dbab1f7ed33212c78ecce11f.tar.gz
podman-1c0cd0796abd4230dbab1f7ed33212c78ecce11f.tar.bz2
podman-1c0cd0796abd4230dbab1f7ed33212c78ecce11f.zip
docs: consistent format for example
All bash examples are now placed in a code section (```). The PS1 prompt is set to `$`. Signed-off-by: Valentin Rothberg <vrothberg@suse.com> Closes: #1375 Approved by: rhatdan
Diffstat (limited to 'docs')
-rw-r--r--docs/podman-attach.1.md8
-rw-r--r--docs/podman-build.1.md50
-rw-r--r--docs/podman-commit.1.md8
-rw-r--r--docs/podman-container-refresh.1.md2
-rw-r--r--docs/podman-create.1.md4
-rw-r--r--docs/podman-exec.1.md3
-rw-r--r--docs/podman-export.1.md6
-rw-r--r--docs/podman-history.1.md8
-rw-r--r--docs/podman-import.1.md8
-rw-r--r--docs/podman-load.1.md8
-rw-r--r--docs/podman-login.1.md6
-rw-r--r--docs/podman-logout.1.md6
-rw-r--r--docs/podman-pod-create.1.md9
-rw-r--r--docs/podman-pod-ps.1.md18
-rw-r--r--docs/podman-pod-top.1.md4
-rw-r--r--docs/podman-ps.1.md10
-rw-r--r--docs/podman-pull.1.md8
-rw-r--r--docs/podman-restart.1.md6
-rw-r--r--docs/podman-run.1.md116
-rw-r--r--docs/podman-save.1.md10
-rw-r--r--docs/podman-search.1.md10
-rw-r--r--docs/podman-tag.1.md7
-rw-r--r--docs/podman-top.1.md4
-rw-r--r--docs/podman-varlink.1.md2
-rw-r--r--docs/podman-wait.1.md10
25 files changed, 185 insertions, 146 deletions
diff --git a/docs/podman-attach.1.md b/docs/podman-attach.1.md
index 22ece8602..4322ca2be 100644
--- a/docs/podman-attach.1.md
+++ b/docs/podman-attach.1.md
@@ -35,19 +35,19 @@ Proxy received signals to the process (non-TTY mode only). SIGCHLD, SIGSTOP, and
## EXAMPLES ##
```
-podman attach foobar
+$ podman attach foobar
[root@localhost /]#
```
```
-podman attach --latest
+$ podman attach --latest
[root@localhost /]#
```
```
-podman attach 1234
+$ podman attach 1234
[root@localhost /]#
```
```
-podman attach --no-stdin foobar
+$ podman attach --no-stdin foobar
```
## SEE ALSO
podman(1), podman-exec(1), podman-run(1)
diff --git a/docs/podman-build.1.md b/docs/podman-build.1.md
index 079d63c36..dc5be3838 100644
--- a/docs/podman-build.1.md
+++ b/docs/podman-build.1.md
@@ -537,41 +537,43 @@ mount can be changed directly. For instance if `/` is the source mount for
### Build an image using local Dockerfiles
-podman build .
+```
+$ podman build .
-podman build -f Dockerfile.simple .
+$ podman build -f Dockerfile.simple .
-cat ~/Dockerfile | podman build -f - .
+$ cat ~/Dockerfile | podman build -f - .
-podman build -f Dockerfile.simple -f Dockerfile.notsosimple .
+$ podman build -f Dockerfile.simple -f Dockerfile.notsosimple .
-podman build -f Dockerfile.in ~
+$ podman build -f Dockerfile.in ~
-podman build -t imageName .
+$ podman build -t imageName .
-podman build --tls-verify=true -t imageName -f Dockerfile.simple .
+$ podman build --tls-verify=true -t imageName -f Dockerfile.simple .
-podman build --tls-verify=false -t imageName .
+$ podman build --tls-verify=false -t imageName .
-podman build --runtime-flag log-format=json .
+$ podman build --runtime-flag log-format=json .
-podman build --runtime-flag debug .
+$ podman build --runtime-flag debug .
-podman build --authfile /tmp/auths/myauths.json --cert-dir ~/auth --tls-verify=true --creds=username:password -t imageName -f Dockerfile.simple .
+$ podman build --authfile /tmp/auths/myauths.json --cert-dir ~/auth --tls-verify=true --creds=username:password -t imageName -f Dockerfile.simple .
-podman build --memory 40m --cpu-period 10000 --cpu-quota 50000 --ulimit nofile=1024:1028 -t imageName .
+$ podman build --memory 40m --cpu-period 10000 --cpu-quota 50000 --ulimit nofile=1024:1028 -t imageName .
-podman build --security-opt label=level:s0:c100,c200 --cgroup-parent /path/to/cgroup/parent -t imageName .
+$ podman build --security-opt label=level:s0:c100,c200 --cgroup-parent /path/to/cgroup/parent -t imageName .
-podman build --volume /home/test:/myvol:ro,Z -t imageName .
+$ podman build --volume /home/test:/myvol:ro,Z -t imageName .
-podman build --layers -t imageName .
+$ podman build --layers -t imageName .
-podman build --no-cache -t imageName .
+$ podman build --no-cache -t imageName .
-podman build --layers --force-rm -t imageName .
+$ podman build --layers --force-rm -t imageName .
-podman build --no-cache --rm=false -t imageName .
+$ podman build --no-cache --rm=false -t imageName .
+```
### Building an image using a URL, Git repo, or archive
@@ -581,19 +583,25 @@ podman build --no-cache --rm=false -t imageName .
Podman will download the Dockerfile to a temporary location and then use it as the build context.
- `podman build https://10.10.10.1/podman/Dockerfile`
+```
+$ podman build https://10.10.10.1/podman/Dockerfile
+```
#### Building an image using a Git repository
Podman will clone the specified GitHub repository to a temporary location and use it as the context. The Dockerfile at the root of the repository will be used and it only works if the GitHub repository is a dedicated repository.
- `podman build git://github.com/scollier/purpletest`
+```
+$ podman build git://github.com/scollier/purpletest
+```
#### Building an image using a URL to an archive
Podman will fetch the archive file, decompress it, and use its contents as the build context. The Dockerfile at the root of the archive and the rest of the archive will get used as the context of the build. If you pass `-f PATH/Dockerfile` option as well, the system will look for that file inside the contents of the archive.
- `podman build -f dev/Dockerfile https://10.10.10.1/podman/context.tar.gz`
+```
+$ podman build -f dev/Dockerfile https://10.10.10.1/podman/context.tar.gz
+```
Note: supported compression formats are 'xz', 'bzip2', 'gzip' and 'identity' (no compression).
diff --git a/docs/podman-commit.1.md b/docs/podman-commit.1.md
index dd82c80e4..79e14aba6 100644
--- a/docs/podman-commit.1.md
+++ b/docs/podman-commit.1.md
@@ -54,7 +54,7 @@ Suppress output
## EXAMPLES
```
-# podman commit --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change LABEL=blue=image reverent_golick image-commited
+$ podman commit --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change LABEL=blue=image reverent_golick image-commited
Getting image source signatures
Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
25.80 MB / 25.80 MB [======================================================] 0s
@@ -66,17 +66,17 @@ e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
```
```
-# podman commit -q --message "committing container to image" reverent_golick image-commited
+$ podman commit -q --message "committing container to image" reverent_golick image-commited
e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
```
```
-# podman commit -q --author "firstName lastName" reverent_golick image-commited
+$ podman commit -q --author "firstName lastName" reverent_golick image-commited
e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
```
```
-# podman commit -q --pause=false reverent_golick image-commited
+$ podman commit -q --pause=false reverent_golick image-commited
e3ce4d93051ceea088d1c242624d659be32cf1667ef62f1d16d6b60193e2c7a8
```
diff --git a/docs/podman-container-refresh.1.md b/docs/podman-container-refresh.1.md
index 494255dc7..26552faa6 100644
--- a/docs/podman-container-refresh.1.md
+++ b/docs/podman-container-refresh.1.md
@@ -17,7 +17,7 @@ As part of refresh, all running containers will be restarted.
## EXAMPLES ##
```
-podman container refresh
+$ podman container refresh
[root@localhost /]#
```
diff --git a/docs/podman-create.1.md b/docs/podman-create.1.md
index 42a4cdbca..f27a84b1d 100644
--- a/docs/podman-create.1.md
+++ b/docs/podman-create.1.md
@@ -713,7 +713,9 @@ can override the working directory by using the **-w** option.
If you want to run the container in a new user namespace and define the mapping of
the uid and gid from the host.
- # podman create --uidmap 0:30000:7000 --gidmap 0:30000:7000 fedora echo hello
+```
+$ podman create --uidmap 0:30000:7000 --gidmap 0:30000:7000 fedora echo hello
+```
## FILES
diff --git a/docs/podman-exec.1.md b/docs/podman-exec.1.md
index 700d1f89a..284fa5a4a 100644
--- a/docs/podman-exec.1.md
+++ b/docs/podman-exec.1.md
@@ -38,9 +38,6 @@ Sets the username or UID used and optionally the groupname or GID for the specif
The following examples are all valid:
--user [user | user:group | uid | uid:gid | user:gid | uid:group ]
-## EXAMPLES
-
-
## SEE ALSO
podman(1), podman-run(1)
diff --git a/docs/podman-export.1.md b/docs/podman-export.1.md
index ff7e660bc..a8810f534 100644
--- a/docs/podman-export.1.md
+++ b/docs/podman-export.1.md
@@ -31,11 +31,9 @@ Print usage statement
## EXAMPLES
```
-# podman export -o redis-container.tar 883504668ec465463bc0fe7e63d53154ac3b696ea8d7b233748918664ea90e57
-```
+$ podman export -o redis-container.tar 883504668ec465463bc0fe7e63d53154ac3b696ea8d7b233748918664ea90e57
-```
-# podman export > redis-container.tar 883504668ec465463bc0fe7e63d53154ac3b696ea8d7b233748918664ea90e57
+$ podman export > redis-container.tar 883504668ec465463bc0fe7e63d53154ac3b696ea8d7b233748918664ea90e57
```
## SEE ALSO
diff --git a/docs/podman-history.1.md b/docs/podman-history.1.md
index 4993fa07d..bca8cb1d2 100644
--- a/docs/podman-history.1.md
+++ b/docs/podman-history.1.md
@@ -50,27 +50,27 @@ Print usage statement
## EXAMPLES
```
-# podman history debian
+$ podman history debian
ID CREATED CREATED BY SIZE COMMENT
b676ca55e4f2c 9 weeks ago /bin/sh -c #(nop) CMD ["bash"] 0 B
<missing> 9 weeks ago /bin/sh -c #(nop) ADD file:ebba725fb97cea4... 45.14 MB
```
```
-# podman history --no-trunc=true --human=false debian
+$ podman history --no-trunc=true --human=false debian
ID CREATED CREATED BY SIZE COMMENT
b676ca55e4f2c 2017-07-24T16:52:55Z /bin/sh -c #(nop) CMD ["bash"] 0
<missing> 2017-07-24T16:52:54Z /bin/sh -c #(nop) ADD file:ebba725fb97cea4... 45142935
```
```
-# podman history --format "{{.ID}} {{.Created}}" debian
+$ podman history --format "{{.ID}} {{.Created}}" debian
b676ca55e4f2c 9 weeks ago
<missing> 9 weeks ago
```
```
-# podman history --format json debian
+$ podman history --format json debian
[
{
"id": "b676ca55e4f2c0ce53d0636438c5372d3efeb5ae99b676fa5a5d1581bad46060",
diff --git a/docs/podman-import.1.md b/docs/podman-import.1.md
index b1176cee9..c80c4ff77 100644
--- a/docs/podman-import.1.md
+++ b/docs/podman-import.1.md
@@ -40,7 +40,7 @@ Print usage statement
## EXAMPLES
```
-# podman import --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change LABEL=blue=image ctr.tar image-imported
+$ podman import --change CMD=/bin/bash --change ENTRYPOINT=/bin/sh --change LABEL=blue=image ctr.tar image-imported
Getting image source signatures
Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
25.80 MB / 25.80 MB [======================================================] 0s
@@ -52,12 +52,12 @@ db65d991f3bbf7f31ed1064db9a6ced7652e3f8166c4736aa9133dadd3c7acb3
```
```
-# cat ctr.tar | podman -q import --message "importing the ctr.tar tarball" - image-imported
+$ cat ctr.tar | podman -q import --message "importing the ctr.tar tarball" - image-imported
db65d991f3bbf7f31ed1064db9a6ced7652e3f8166c4736aa9133dadd3c7acb3
```
```
-# cat ctr.tar | podman import -
+$ cat ctr.tar | podman import -
Getting image source signatures
Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
25.80 MB / 25.80 MB [======================================================] 0s
@@ -69,7 +69,7 @@ db65d991f3bbf7f31ed1064db9a6ced7652e3f8166c4736aa9133dadd3c7acb3
```
```
-podman import http://example.com/ctr.tar url-image
+$ podman import http://example.com/ctr.tar url-image
Downloading from "http://example.com/ctr.tar"
Getting image source signatures
Copying blob sha256:b41deda5a2feb1f03a5c1bb38c598cbc12c9ccd675f438edc6acd815f7585b86
diff --git a/docs/podman-load.1.md b/docs/podman-load.1.md
index 753908d75..eca7ecb2e 100644
--- a/docs/podman-load.1.md
+++ b/docs/podman-load.1.md
@@ -41,15 +41,15 @@ Print usage statement
## EXAMPLES
```
-# podman load --quiet -i fedora.tar
+$ podman load --quiet -i fedora.tar
```
```
-# podman load -q --signature-policy /etc/containers/policy.json -i fedora.tar
+$ podman load -q --signature-policy /etc/containers/policy.json -i fedora.tar
```
```
-# podman load < fedora.tar
+$ podman load < fedora.tar
Getting image source signatures
Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0
0 B / 4.03 MB [---------------------------------------------------------------]
@@ -61,7 +61,7 @@ Loaded image: registry.fedoraproject.org/fedora:latest
```
```
-# cat fedora.tar | podman load
+$ cat fedora.tar | podman load
Getting image source signatures
Copying blob sha256:5bef08742407efd622d243692b79ba0055383bbce12900324f75e56f589aedb0
0 B / 4.03 MB [---------------------------------------------------------------]
diff --git a/docs/podman-login.1.md b/docs/podman-login.1.md
index e13ddfff7..a0b9a2fe6 100644
--- a/docs/podman-login.1.md
+++ b/docs/podman-login.1.md
@@ -49,19 +49,19 @@ Print usage statement
## EXAMPLES
```
-# podman login docker.io
+$ podman login docker.io
Username: umohnani
Password:
Login Succeeded!
```
```
-# podman login -u testuser -p testpassword localhost:5000
+$ podman login -u testuser -p testpassword localhost:5000
Login Succeeded!
```
```
-# podman login --authfile authdir/myauths.json docker.io
+$ podman login --authfile authdir/myauths.json docker.io
Username: umohnani
Password:
Login Succeeded!
diff --git a/docs/podman-logout.1.md b/docs/podman-logout.1.md
index f90e02102..4e001085c 100644
--- a/docs/podman-logout.1.md
+++ b/docs/podman-logout.1.md
@@ -35,17 +35,17 @@ Print usage statement
## EXAMPLES
```
-# podman logout docker.io
+$ podman logout docker.io
Remove login credentials for https://registry-1.docker.io/v2/
```
```
-# podman logout --authfile authdir/myauths.json docker.io
+$ podman logout --authfile authdir/myauths.json docker.io
Remove login credentials for https://registry-1.docker.io/v2/
```
```
-# podman logout --all
+$ podman logout --all
Remove login credentials for all registries
```
diff --git a/docs/podman-pod-create.1.md b/docs/podman-pod-create.1.md
index fb0a30935..2d1c7fdb3 100644
--- a/docs/podman-pod-create.1.md
+++ b/docs/podman-pod-create.1.md
@@ -66,12 +66,13 @@ for it. The name is useful any place you need to identify a pod.
## EXAMPLES
+```
+$ podman pod create --name test
-# podman pod create --name test
+$ podman pod create --infra=false
-# podman pod create --infra=false
-
-# podman pod create --infra-command /top
+$ podman pod create --infra-command /top
+```
## SEE ALSO
podman-pod(1)
diff --git a/docs/podman-pod-ps.1.md b/docs/podman-pod-ps.1.md
index 41c36a749..24b343438 100644
--- a/docs/podman-pod-ps.1.md
+++ b/docs/podman-pod-ps.1.md
@@ -96,61 +96,61 @@ Print usage statement
## EXAMPLES
```
-sudo podman pod ps
+$ podman pod ps
POD ID NAME STATUS NUMBER OF CONTAINERS
00dfd6fa02c0 jolly_goldstine Running 1
f4df8692e116 nifty_torvalds Created 2
```
```
-sudo podman pod ps --ctr-names
+$ podman pod ps --ctr-names
POD ID NAME STATUS CONTAINER INFO
00dfd6fa02c0 jolly_goldstine Running [ loving_archimedes ]
f4df8692e116 nifty_torvalds Created [ thirsty_hawking ] [ wizardly_golick ]
```
```
-podman pod ps --ctr-status --ctr-names --ctr-ids
+$ podman pod ps --ctr-status --ctr-names --ctr-ids
POD ID NAME STATUS CONTAINER INFO
00dfd6fa02c0 jolly_goldstine Running [ ba465ab0a3a4 loving_archimedes Running ]
f4df8692e116 nifty_torvalds Created [ 331693bff40a thirsty_hawking Created ] [ 8e428daeb89e wizardly_golick Created ]
```
```
-sudo podman pod ps --format "{{.ID}} {{.ContainerInfo}} {{.Cgroup}}" --ctr-names
+$ podman pod ps --format "{{.ID}} {{.ContainerInfo}} {{.Cgroup}}" --ctr-names
00dfd6fa02c0 [ loving_archimedes ] /libpod_parent
f4df8692e116 [ thirsty_hawking ] [ wizardly_golick ] /libpod_parent
```
```
-sudo podman pod ps --cgroup
+$ podman pod ps --cgroup
POD ID NAME STATUS NUMBER OF CONTAINERS CGROUP USE POD CGROUP
00dfd6fa02c0 jolly_goldstine Running 1 /libpod_parent true
f4df8692e116 nifty_torvalds Created 2 /libpod_parent true
```
```
-podman pod ps --sort id --filter ctr-number=2
+$ podman pod ps --sort id --filter ctr-number=2
POD ID NAME STATUS NUMBER OF CONTAINERS
f4df8692e116 nifty_torvalds Created 2
```
```
-sudo podman pod ps --ctr-ids
+$ podman pod ps --ctr-ids
POD ID NAME STATUS CONTAINER INFO
00dfd6fa02c0 jolly_goldstine Running [ ba465ab0a3a4 ]
f4df8692e116 nifty_torvalds Created [ 331693bff40a ] [ 8e428daeb89e ]
```
```
-sudo podman pod ps --no-trunc --ctr-ids
+$ podman pod ps --no-trunc --ctr-ids
POD ID NAME STATUS CONTAINER INFO
00dfd6fa02c0a2daaedfdf8fcecd06f22ad114d46d167d71777224735f701866 jolly_goldstine Running [ ba465ab0a3a4e15e3539a1e79c32d1213a02b0989371e274f98e0f1ae9de7050 ]
f4df8692e116a3e6d1d62572644ed36ca475d933808cc3c93435c45aa139314b nifty_torvalds Created [ 331693bff40a0ef2f05a3aba73ce49e3243108911927fff04d1f7fc44dda8022 ] [ 8e428daeb89e69b71e7916a13accfb87d122889442b5c05c2d99cf94a3230e9d ]
```
```
-podman pod ps --ctr-names
+$ podman pod ps --ctr-names
POD ID NAME STATUS CONTAINER INFO
314f4da82d74 hi Created [ jovial_jackson ] [ hopeful_archimedes ] [ vibrant_ptolemy ] [ heuristic_jennings ] [ keen_raman ] [ hopeful_newton ] [ mystifying_bose ] [ silly_lalande ] [ serene_lichterman ] ...
```
diff --git a/docs/podman-pod-top.1.md b/docs/podman-pod-top.1.md
index 3f714af20..0b330eb03 100644
--- a/docs/podman-pod-top.1.md
+++ b/docs/podman-pod-top.1.md
@@ -70,7 +70,7 @@ The following descriptors are supported in addition to the AIX format descriptor
By default, `podman-top` prints data similar to `ps -ef`:
```
- # podman pod top b031293491cc
+$ podman pod top b031293491cc
USER PID PPID %CPU ELAPSED TTY TIME COMMAND
root 1 0 0.000 2h5m38.737137571s ? 0s top
root 8 0 0.000 2h5m15.737228361s ? 0s top
@@ -79,7 +79,7 @@ root 8 0 0.000 2h5m15.737228361s ? 0s top
The output can be controlled by specifying format descriptors as arguments after the pod:
```
- # podman pod top -l pid seccomp args %C
+$ podman pod top -l pid seccomp args %C
PID SECCOMP COMMAND %CPU
1 filter top 0.000
1 filter /bin/sh 0.000
diff --git a/docs/podman-ps.1.md b/docs/podman-ps.1.md
index 03150f38b..2cb77ffed 100644
--- a/docs/podman-ps.1.md
+++ b/docs/podman-ps.1.md
@@ -106,27 +106,27 @@ Print usage statement
## EXAMPLES
```
-sudo podman ps -a
+$ podman ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
02f65160e14ca redis:alpine "redis-server" 19 hours ago Exited (-1) 19 hours ago 6379/tcp k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0
69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1
```
```
-sudo podman ps -a -s
+$ podman ps -a -s
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES SIZE
02f65160e14ca redis:alpine "redis-server" 20 hours ago Exited (-1) 20 hours ago 6379/tcp k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0 27.49 MB
69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1 27.49 MB
```
```
-sudo podman ps -a --format "{{.ID}} {{.Image}} {{.Labels}} {{.Mounts}}"
+$ podman ps -a --format "{{.ID}} {{.Image}} {{.Labels}} {{.Mounts}}"
02f65160e14ca redis:alpine tier=backend proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/
69ed779d8ef9f redis:alpine batch=no,type=small proc,tmpfs,devpts,shm,mqueue,sysfs,cgroup,/var/run/,/var/run/
```
```
-sudo podman ps --ns -a
+$ podman ps --ns -a
CONTAINER ID NAMES PID CGROUP IPC MNT NET PIDNS USER UTS
3557d882a82e3 k8s_container2_podsandbox1_redhat.test.crio_redhat-test-crio_1 29910 4026531835 4026532585 4026532593 4026532508 4026532595 4026531837 4026532594
09564cdae0bec k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1 29851 4026531835 4026532585 4026532590 4026532508 4026532592 4026531837 4026532591
@@ -134,7 +134,7 @@ a31ebbee9cee7 k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-c
```
```
-sudo podman ps -a --size --sort names
+$ podman ps -a --size --sort names
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
69ed779d8ef9f redis:alpine "redis-server" 25 hours ago Created 6379/tcp k8s_container1_podsandbox1_redhat.test.crio_redhat-test-crio_1
02f65160e14ca redis:alpine "redis-server" 19 hours ago Exited (-1) 19 hours ago 6379/tcp k8s_podsandbox1-redis_podsandbox1_redhat.test.crio_redhat-test-crio_0
diff --git a/docs/podman-pull.1.md b/docs/podman-pull.1.md
index bda7f671f..6eff52cea 100644
--- a/docs/podman-pull.1.md
+++ b/docs/podman-pull.1.md
@@ -84,7 +84,7 @@ Print usage statement
## EXAMPLES
```
-# podman pull --signature-policy /etc/containers/policy.json alpine:latest
+$ podman pull --signature-policy /etc/containers/policy.json alpine:latest
Trying to pull registry.access.redhat.com/alpine:latest... Failed
Trying to pull registry.fedoraproject.org/alpine:latest... Failed
Trying to pull docker.io/library/alpine:latest...Getting image source signatures
@@ -98,7 +98,7 @@ Storing signatures
```
```
-# podman pull --authfile temp-auths/myauths.json docker://docker.io/umohnani/finaltest
+$ podman pull --authfile temp-auths/myauths.json docker://docker.io/umohnani/finaltest
Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures
Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913
1.90 MB / 1.90 MB [========================================================] 0s
@@ -110,7 +110,7 @@ Storing signatures
```
```
-# podman pull --creds testuser:testpassword docker.io/umohnani/finaltest
+$ podman pull --creds testuser:testpassword docker.io/umohnani/finaltest
Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures
Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913
1.90 MB / 1.90 MB [========================================================] 0s
@@ -122,7 +122,7 @@ Storing signatures
```
```
-# podman pull --tls-verify=false --cert-dir image/certs docker.io/umohnani/finaltest
+$ podman pull --tls-verify=false --cert-dir image/certs docker.io/umohnani/finaltest
Trying to pull docker.io/umohnani/finaltest:latest...Getting image source signatures
Copying blob sha256:6d987f6f42797d81a318c40d442369ba3dc124883a0964d40b0c8f4f7561d913
1.90 MB / 1.90 MB [========================================================] 0s
diff --git a/docs/podman-restart.1.md b/docs/podman-restart.1.md
index e9c76ebb3..caacaf31d 100644
--- a/docs/podman-restart.1.md
+++ b/docs/podman-restart.1.md
@@ -24,17 +24,17 @@ to run containers such as CRI-O, the last started container could be from either
## EXAMPLES ##
```
-podman restart -l
+$ podman restart -l
ec588fc80b05e19d3006bf2e8aa325f0a2e2ff1f609b7afb39176ca8e3e13467
```
```
-podman restart ff6cf1
+$ podman restart ff6cf1
ff6cf1e5e77e6dba1efc7f3fcdb20e8b89ad8947bc0518be1fcb2c78681f226f
```
```
-podman restart --timeout 4 test1 test2
+$ podman restart --timeout 4 test1 test2
c3bb026838c30e5097f079fa365c9a4769d52e1017588278fa00d5c68ebc1502
17e13a63081a995136f907024bcfe50ff532917988a152da229db9d894c5a9ec
```
diff --git a/docs/podman-run.1.md b/docs/podman-run.1.md
index 1dbb7814e..d01d5c100 100644
--- a/docs/podman-run.1.md
+++ b/docs/podman-run.1.md
@@ -783,24 +783,32 @@ This protects the containers image from modification. Read only containers may
still need to write temporary data. The best way to handle this is to mount
tmpfs directories on /run and /tmp.
- # podman run --read-only --tmpfs /run --tmpfs /tmp -i -t fedora /bin/bash
+```
+$ podman run --read-only --tmpfs /run --tmpfs /tmp -i -t fedora /bin/bash
+```
### Exposing log messages from the container to the host's log
If you want messages that are logged in your container to show up in the host's
syslog/journal then you should bind mount the /dev/log directory as follows.
- # podman run -v /dev/log:/dev/log -i -t fedora /bin/bash
+```
+$ podman run -v /dev/log:/dev/log -i -t fedora /bin/bash
+```
From inside the container you can test this by sending a message to the log.
- (bash)# logger "Hello from my container"
+```
+(bash)# logger "Hello from my container"
+```
Then exit and check the journal.
- # exit
+```
+(bash)# exit
- # journalctl -b | grep Hello
+$ journalctl -b | grep Hello
+```
This should list the message sent to logger.
@@ -810,7 +818,9 @@ If you do not specify -a then podman will attach everything (stdin,stdout,stderr
You can specify to which of the three standard streams (stdin, stdout, stderr)
you'd like to connect instead, as in:
- # podman run -a stdin -a stdout -i -t fedora /bin/bash
+```
+$ podman run -a stdin -a stdout -i -t fedora /bin/bash
+```
## Sharing IPC between containers
@@ -821,60 +831,60 @@ Testing `--ipc=host` mode:
Host shows a shared memory segment with 7 pids attached, happens to be from httpd:
```
- $ sudo ipcs -m
+$ sudo ipcs -m
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
- 0x01128e25 0 root 600 1000 7
+------ Shared Memory Segments --------
+key shmid owner perms bytes nattch status
+0x01128e25 0 root 600 1000 7
```
Now run a regular container, and it correctly does NOT see the shared memory segment from the host:
```
- $ podman run -it shm ipcs -m
+$ podman run -it shm ipcs -m
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
+------ Shared Memory Segments --------
+key shmid owner perms bytes nattch status
```
Run a container with the new `--ipc=host` option, and it now sees the shared memory segment from the host httpd:
- ```
- $ podman run -it --ipc=host shm ipcs -m
+```
+$ podman run -it --ipc=host shm ipcs -m
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
- 0x01128e25 0 root 600 1000 7
+------ Shared Memory Segments --------
+key shmid owner perms bytes nattch status
+0x01128e25 0 root 600 1000 7
```
Testing `--ipc=container:CONTAINERID` mode:
Start a container with a program to create a shared memory segment:
```
- $ podman run -it shm bash
- $ sudo shm/shm_server &
- $ sudo ipcs -m
+$ podman run -it shm bash
+$ sudo shm/shm_server &
+$ sudo ipcs -m
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
- 0x0000162e 0 root 666 27 1
+------ Shared Memory Segments --------
+key shmid owner perms bytes nattch status
+0x0000162e 0 root 666 27 1
```
Create a 2nd container correctly shows no shared memory segment from 1st container:
```
- $ podman run shm ipcs -m
+$ podman run shm ipcs -m
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
+------ Shared Memory Segments --------
+key shmid owner perms bytes nattch status
```
Create a 3rd container using the new --ipc=container:CONTAINERID option, now it shows the shared memory segment from the first:
```
- $ podman run -it --ipc=container:ed735b2264ac shm ipcs -m
- $ sudo ipcs -m
+$ podman run -it --ipc=container:ed735b2264ac shm ipcs -m
+$ sudo ipcs -m
- ------ Shared Memory Segments --------
- key shmid owner perms bytes nattch status
- 0x0000162e 0 root 666 27 1
+------ Shared Memory Segments --------
+key shmid owner perms bytes nattch status
+0x0000162e 0 root 666 27 1
```
### Mapping Ports for External Usage
@@ -883,7 +893,9 @@ The exposed port of an application can be mapped to a host port using the **-p**
flag. For example, an httpd port 80 can be mapped to the host port 8080 using the
following:
- # podman run -p 8080:80 -d -i -t fedora/httpd
+```
+$ podman run -p 8080:80 -d -i -t fedora/httpd
+```
### Mounting External Volumes
@@ -891,20 +903,22 @@ To mount a host directory as a container volume, specify the absolute path to
the directory and the absolute path for the container directory separated by a
colon:
- # podman run -v /var/db:/data1 -i -t fedora bash
+```
+$ podman run -v /var/db:/data1 -i -t fedora bash
+```
When using SELinux, be aware that the host has no knowledge of container SELinux
policy. Therefore, in the above example, if SELinux policy is enforced, the
`/var/db` directory is not writable to the container. A "Permission Denied"
message will occur and an avc: message in the host's syslog.
-
To work around this, at time of writing this man page, the following command
needs to be run in order for the proper SELinux policy type label to be attached
to the host directory:
- # chcon -Rt svirt_sandbox_file_t /var/db
-
+```
+$ chcon -Rt svirt_sandbox_file_t /var/db
+```
Now, writing to the /data1 volume in the container will be allowed and the
changes will also be reflected on the host in /var/db.
@@ -916,23 +930,31 @@ the `--security-opt` flag. For example, you can specify the MCS/MLS level, a
requirement for MLS systems. Specifying the level in the following command
allows you to share the same content between containers.
- # podman run --security-opt label=level:s0:c100,c200 -i -t fedora bash
+```
+podman run --security-opt label=level:s0:c100,c200 -i -t fedora bash
+```
An MLS example might be:
- # podman run --security-opt label=level:TopSecret -i -t rhel7 bash
+```
+$ podman run --security-opt label=level:TopSecret -i -t rhel7 bash
+```
To disable the security labeling for this container versus running with the
`--permissive` flag, use the following command:
- # podman run --security-opt label=disable -i -t fedora bash
+```
+$ podman run --security-opt label=disable -i -t fedora bash
+```
If you want a tighter security policy on the processes within a container,
you can specify an alternate type for the container. You could run a container
that is only allowed to listen on Apache ports by executing the following
command:
- # podman run --security-opt label=type:svirt_apache_t -i -t centos bash
+```
+$ podman run --security-opt label=type:svirt_apache_t -i -t centos bash
+```
Note:
@@ -943,7 +965,9 @@ You would have to write policy defining a `svirt_apache_t` type.
If you want to set `/dev/sda` device weight to `200`, you can specify the device
weight by `--blkio-weight-device` flag. Use the following command:
- # podman run -it --blkio-weight-device "/dev/sda:200" ubuntu
+```
+$ podman run -it --blkio-weight-device "/dev/sda:200" ubuntu
+```
### Setting Namespaced Kernel Parameters (Sysctls)
@@ -951,7 +975,9 @@ The `--sysctl` sets namespaced kernel parameters (sysctls) in the
container. For example, to turn on IP forwarding in the containers
network namespace, run this command:
- $ podman run --sysctl net.ipv4.ip_forward=1 someimage
+```
+$ podman run --sysctl net.ipv4.ip_forward=1 someimage
+```
Note:
@@ -967,7 +993,9 @@ supported sysctls.
If you want to run the container in a new user namespace and define the mapping of
the uid and gid from the host.
- # podman run --uidmap 0:30000:7000 --gidmap 0:30000:7000 fedora echo hello
+```
+$ podman run --uidmap 0:30000:7000 --gidmap 0:30000:7000 fedora echo hello
+```
## FILES
diff --git a/docs/podman-save.1.md b/docs/podman-save.1.md
index 773b45b20..a0b04d633 100644
--- a/docs/podman-save.1.md
+++ b/docs/podman-save.1.md
@@ -50,19 +50,19 @@ Print usage statement
## EXAMPLES
```
-# podman save --quiet -o alpine.tar alpine:2.6
+$ podman save --quiet -o alpine.tar alpine:2.6
```
```
-# podman save > alpine-all.tar alpine
+$ podman save > alpine-all.tar alpine
```
```
-# podman save -o oci-alpine.tar --format oci-archive alpine
+$ podman save -o oci-alpine.tar --format oci-archive alpine
```
```
-# podman save --compress --format oci-dir -o alp-dir alpine
+$ podman save --compress --format oci-dir -o alp-dir alpine
Getting image source signatures
Copying blob sha256:2fdfe1cd78c20d05774f0919be19bc1a3e4729bce219968e4188e7e0f1af679d
1.97 MB / 1.97 MB [========================================================] 0s
@@ -73,7 +73,7 @@ Storing signatures
```
```
-# podman save --format docker-dir -o ubuntu-dir ubuntu
+$ podman save --format docker-dir -o ubuntu-dir ubuntu
Getting image source signatures
Copying blob sha256:660c48dd555dcbfdfe19c80a30f557ac57a15f595250e67bfad1e5663c1725bb
45.55 MB / 45.55 MB [======================================================] 8s
diff --git a/docs/podman-search.1.md b/docs/podman-search.1.md
index d716b91f4..9cc9e1e6b 100644
--- a/docs/podman-search.1.md
+++ b/docs/podman-search.1.md
@@ -78,7 +78,7 @@ Print usage statement
## EXAMPLES
```
-# podman search --limit 3 rhel
+$ podman search --limit 3 rhel
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/richxsl/rhel7 RHEL 7 image with minimal installation 9
docker.io docker.io/bluedata/rhel7 RHEL-7.x base container images 1
@@ -89,7 +89,7 @@ redhat.com redhat.com/rhel6.5 This platform image provides a
```
```
-# podman search alpine
+$ podman search alpine
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/library/alpine A minimal Docker image based on Alpine Linux... 3009 [OK]
docker.io docker.io/mhart/alpine-node Minimal Node.js built on Alpine Linux 332
@@ -98,20 +98,20 @@ docker.io docker.io/tenstartups/alpine Alpine linux base d
```
```
-# podman search registry.fedoraproject.org/fedora
+$ podman search registry.fedoraproject.org/fedora
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
fedoraproject.org fedoraproject.org/fedora 0
fedoraproject.org fedoraproject.org/fedora-minimal 0
```
```
-# podman search --filter=is-official alpine
+$ podman search --filter=is-official alpine
INDEX NAME DESCRIPTION STARS OFFICIAL AUTOMATED
docker.io docker.io/library/alpine A minimal Docker image based on Alpine Linux... 3009 [OK]
```
```
-# podman search --format "table {{.Index}} {{.Name}}" registry.fedoraproject.org/fedora
+$ podman search --format "table {{.Index}} {{.Name}}" registry.fedoraproject.org/fedora
INDEX NAME
fedoraproject.org fedoraproject.org/fedora
fedoraproject.org fedoraproject.org/fedora-minimal
diff --git a/docs/podman-tag.1.md b/docs/podman-tag.1.md
index ef4a2a0f6..6525995f0 100644
--- a/docs/podman-tag.1.md
+++ b/docs/podman-tag.1.md
@@ -20,9 +20,12 @@ Print usage statement
## EXAMPLES
- podman tag 0e3bbc2 fedora:latest
+```
+$ podman tag 0e3bbc2 fedora:latest
+
+$ podman tag httpd myregistryhost:5000/fedora/httpd:v2
+```
- podman tag httpd myregistryhost:5000/fedora/httpd:v2
## SEE ALSO
podman(1), crio(8)
diff --git a/docs/podman-top.1.md b/docs/podman-top.1.md
index b89316859..7782a3f29 100644
--- a/docs/podman-top.1.md
+++ b/docs/podman-top.1.md
@@ -71,7 +71,7 @@ The following descriptors are supported in addition to the AIX format descriptor
By default, `podman-top` prints data similar to `ps -ef`:
```
-# podman top f5a62a71b07
+$ podman top f5a62a71b07
USER PID PPID %CPU ELAPSED TTY TIME COMMAND
root 1 0 0.000 20.386825206s pts/0 0s sh
root 7 1 0.000 16.386882887s pts/0 0s sleep
@@ -81,7 +81,7 @@ root 8 1 0.000 11.386886562s pts/0 0s vi
The output can be controlled by specifying format descriptors as arguments after the container:
```
-# sudo ./bin/podman top -l pid seccomp args %C
+$ sudo ./bin/podman top -l pid seccomp args %C
PID SECCOMP COMMAND %CPU
1 filter sh 0.000
8 filter vi /etc/ 0.000
diff --git a/docs/podman-varlink.1.md b/docs/podman-varlink.1.md
index cd57e8b45..7eeb3dd66 100644
--- a/docs/podman-varlink.1.md
+++ b/docs/podman-varlink.1.md
@@ -43,7 +43,7 @@ This is the preferred method for running the varlink service.
You can do this via systemctl.
```
-systemctl enable --now io.podman.socket
+$ systemctl enable --now io.podman.socket
```
## SEE ALSO
diff --git a/docs/podman-wait.1.md b/docs/podman-wait.1.md
index 3868928dd..74ccdbe0c 100644
--- a/docs/podman-wait.1.md
+++ b/docs/podman-wait.1.md
@@ -24,13 +24,15 @@ to run containers such as CRI-O, the last started container could be from either
## EXAMPLES
- podman wait mywebserver
+```
+$ podman wait mywebserver
- podman wait --latest
+$ podman wait --latest
- podman wait 860a4b23
+$ podman wait 860a4b23
- podman wait mywebserver myftpserver
+$ podman wait mywebserver myftpserver
+```
## SEE ALSO
podman(1), crio(8)