From 2847291fcddba975dc705f9d85afed4a8fd0b5ad Mon Sep 17 00:00:00 2001 From: Michael Marsh <mmarsh@cs.umd.edu> Date: Mon, 3 Feb 2025 10:58:02 -0500 Subject: [PATCH] fixed some formatting --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 4a21bf8..56f7139 100644 --- a/README.md +++ b/README.md @@ -121,7 +121,7 @@ tagged images: docker images A common problem is that we'll end up reusing an old tag, leaving -an image with no repository:tag name. These show up as "<none>:<none>". +an image with no repository:tag name. These show up as `<none>:<none>`. We can get rid of all of these with the following bash one-liner: docker images -a | grep none | awk '{print $3}' | xargs docker rmi @@ -183,7 +183,7 @@ Let's parse this out: synonyms for the container ID By default, names are assigned randomly according to the pattern -<adjective>_<scientist> +`<adjective>_<scientist>` We can assign a name to the container, which is often useful: @@ -205,7 +205,7 @@ We've passed two new options to docker run. The "-t" option allocates a pseudo-TTY, and the "-i" option makes the container interactive. You should now have a shell on the container running as root! If you run "docker ps" in another terminal, you will see that the container status is -"Up <length of time>" +`Up <length of time>` When you're done playing around in this shell, exit to stop the container. @@ -278,14 +278,14 @@ Other Options for Running Containers Here are some useful options you might want to use: -| Option | Argument | Effect | -| ------ | --------------- | ----------------------------------------- | -| --rm | | removes container after exit | -| -ti | | run interactively with a pTTY | -| -e | <vars> | set environment variables | -| -h | <hostname> | set the container's hostname | -| -p | <hport>:<cport> | map host's <hport> to container's <cport> | -| -v | <hdir>:<cdir> | mount host's <hdir> on <cdir> | +| Option | Argument | Effect | +| ------ | --------------- | --------------------------------------------- | +| --rm | | removes container after exit | +| -ti | | run interactively with a pTTY | +| -e | `<vars>` | set environment variables | +| -h | `<hostname>` | set the container's hostname | +| -p |`<hport>:<cport>`| map host's `<hport>` to container's `<cport>` | +| -v | `<hdir>:<cdir>` | mount host's `<hdir>` on `<cdir>` | Executing Commands in a Running Container -- GitLab