From 1c0cd0796abd4230dbab1f7ed33212c78ecce11f Mon Sep 17 00:00:00 2001 From: Valentin Rothberg Date: Thu, 30 Aug 2018 13:05:37 +0200 Subject: 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 Closes: #1375 Approved by: rhatdan --- docs/podman-build.1.md | 50 +++++++++++++++++++++++++++++--------------------- 1 file changed, 29 insertions(+), 21 deletions(-) (limited to 'docs/podman-build.1.md') 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). -- cgit v1.2.3-54-g00ecf