mirror of
https://github.com/89luca89/distrobox.git
synced 2026-08-19 01:14:49 -05:00
create: comments and formatting
Signed-off-by: Luca Di Maio <luca.dimaio1@gmail.com>
This commit is contained in:
+11
-7
@@ -105,13 +105,14 @@ distrobox version: ${version}
|
||||
|
||||
Usage:
|
||||
|
||||
distrobox-create --image registry.fedoraproject.org/fedora-toolbox:35 --name fedora-toolbox-35
|
||||
distrobox-create --clone fedora-toolbox-35 --name fedora-toolbox-35-copy
|
||||
distrobox-create --image alpine my-alpine-container
|
||||
distrobox create --image fedora:35 --name test --volume /opt/my-dir:/usr/local/my-dir:rw --additional-flags "--pids-limit -1"
|
||||
distrobox create --image fedora:35 --name test --additional-flags "--env MY_VAR-value"
|
||||
distrobox create --image alpine:latest --name test --init-hooks "touch /var/tmp/test1 && touch /var/tmp/test2"
|
||||
distrobox create --image fedora:35 --name test --additional-flags "--env MY_VAR-value"
|
||||
distrobox create --image fedora:35 --name test --volume /opt/my-dir:/usr/local/my-dir:rw --additional-flags "--pids-limit -1"
|
||||
distrobox create -i docker.io/almalinux/8-init --init --name test --pre-init-hooks "dnf config-manager --enable powertools && dnf -y install epel-release"
|
||||
distrobox create --clone fedora-toolbox-35 --name fedora-toolbox-35-copy
|
||||
distrobox create --image alpine my-alpine-container
|
||||
distrobox create --image registry.fedoraproject.org/fedora-toolbox:35 --name fedora-toolbox-35
|
||||
distrobox create --pull --image centos:stream9 --home ~/distrobox/centos9
|
||||
|
||||
DBX_NON_INTERACTIVE=1 DBX_CONTAINER_NAME=test-alpine DBX_CONTAINER_IMAGE=alpine distrobox-create
|
||||
|
||||
@@ -582,9 +583,12 @@ fi
|
||||
if [ -n "${container_clone}" ]; then
|
||||
container_image="$(clone_container)"
|
||||
fi
|
||||
# First, check if the image exists in the host.
|
||||
# First, check if the image exists in the host or auto-pull is enabled
|
||||
# If not prompt to download it.
|
||||
if [ "${container_always_pull}" -eq 1 ] || ! ${container_manager} inspect --type image "${container_image}" > /dev/null 2>&1; then
|
||||
if [ "${container_always_pull}" -eq 1 ] ||
|
||||
! ${container_manager} inspect --type image "${container_image}" > /dev/null 2>&1; then
|
||||
|
||||
# If we do auto-pull, don't ask questions
|
||||
if [ "${non_interactive}" -eq 1 ] || [ "${container_always_pull}" -eq 1 ]; then
|
||||
response="yes"
|
||||
else
|
||||
|
||||
@@ -8,14 +8,14 @@ graphical apps (X11/Wayland), and audio.
|
||||
|
||||
Usage:
|
||||
|
||||
distrobox-create --image registry.fedoraproject.org/fedora-toolbox:35 --name fedora-toolbox-35
|
||||
distrobox-create --clone fedora-toolbox-35 --name fedora-toolbox-35-copy
|
||||
distrobox-create --image alpine my-alpine-container
|
||||
distrobox-create --pull --image centos:stream9 --home ~/distrobox/centos9
|
||||
distrobox create --image fedora:35 --name test --volume /opt/my-dir:/usr/local/my-dir:rw --additional-flags "--pids-limit -1"
|
||||
distrobox create --image fedora:35 --name test --additional-flags "--env MY_VAR-value"
|
||||
distrobox create --image alpine:latest --name test --init-hooks "touch /var/tmp/test1 && touch /var/tmp/test2"
|
||||
distrobox create --image fedora:35 --name test --additional-flags "--env MY_VAR-value"
|
||||
distrobox create --image fedora:35 --name test --volume /opt/my-dir:/usr/local/my-dir:rw --additional-flags "--pids-limit -1"
|
||||
distrobox create -i docker.io/almalinux/8-init --init --name test --pre-init-hooks "dnf config-manager --enable powertools && dnf -y install epel-release"
|
||||
distrobox create --clone fedora-toolbox-35 --name fedora-toolbox-35-copy
|
||||
distrobox create --image alpine my-alpine-container
|
||||
distrobox create --image registry.fedoraproject.org/fedora-toolbox:35 --name fedora-toolbox-35
|
||||
distrobox create --pull --image centos:stream9 --home ~/distrobox/centos9
|
||||
|
||||
You can also use environment variables to specify container name, image and container manager:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user