mirror of
https://github.com/chubin/cheat.sheets
synced 2024-11-05 12:00:16 +00:00
parent
7a2557b17a
commit
c2dbffd666
6
sheets/ch-build
Normal file
6
sheets/ch-build
Normal file
@ -0,0 +1,6 @@
|
||||
# ch-build
|
||||
# Utility to build a Charliecloud image and place it in the builder’s back-end storage. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
# Create an image tagged foo and specified by the file /bar/Dockerfile. Use /bar as the Docker context directory. Use the default builder.
|
||||
ch-build -t foo --file=/bar/Dockerfile /bar
|
||||
|
6
sheets/ch-build2dir
Normal file
6
sheets/ch-build2dir
Normal file
@ -0,0 +1,6 @@
|
||||
# ch-build2dir
|
||||
# Utility to build a Charliecloud image from Dockerfile and unpack it into a directory. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
# Build a Charliecloud image using ./Dockerfile.foo and create image directory /var/tmp/foo
|
||||
ch-build2dir -t foo -f ./Dockerfile.foo . /var/tmp
|
||||
|
6
sheets/ch-builder2squash
Normal file
6
sheets/ch-builder2squash
Normal file
@ -0,0 +1,6 @@
|
||||
# ch-builder2squash
|
||||
# Utility to flatten a builder image into a Charliecloud SquashFS file. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
# Flattens the builder image tagged "debian" into a SquashFS file named debian.sqfs in /var/tmp.
|
||||
ch-builder2squash debian /var/tmp
|
||||
|
6
sheets/ch-builder2tar
Normal file
6
sheets/ch-builder2tar
Normal file
@ -0,0 +1,6 @@
|
||||
# ch-builder2tar
|
||||
# Utility to flatten a builder image into a Charliecloud image tarball. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
# Flatten the builder image tagged "hello" into a Charliecloud tarball in directory /var/tmp
|
||||
ch-builder2tar hello /var/tmp
|
||||
|
6
sheets/ch-dir2squash
Normal file
6
sheets/ch-dir2squash
Normal file
@ -0,0 +1,6 @@
|
||||
# ch-dir2squash
|
||||
# Utility to create a SquashFS file from a Charliecloud image directory. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
# Create a Charliecloud SquashFS file debian.sqfs from the image directory /var/tmp/debian under the directory /var/tmp.
|
||||
ch-dir2squash /var/tmp/debian /var/tmp
|
||||
|
9
sheets/ch-grow
Normal file
9
sheets/ch-grow
Normal file
@ -0,0 +1,9 @@
|
||||
# ch-grow
|
||||
# Utility to build and manage Charliecloud images but not running them. It is completely unprivileged, with no setuid/setgid/setcap helpers. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
# Build the image "bar" using ./foo/bar/Dockerfile and context directory ./foo/bar
|
||||
ch-grow build -t bar -f ./foo/bar/Dockerfile ./foo/bar
|
||||
|
||||
# Download the Debian Buster image and place it in /tmp/buster.
|
||||
ch-grow pull debian:buster /tmp/buster
|
||||
|
7
sheets/ch-mount
Normal file
7
sheets/ch-mount
Normal file
@ -0,0 +1,7 @@
|
||||
# ch-mount
|
||||
# Utility to mount a SquashFS image file using FUSE. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
|
||||
# Create a new empty directory named debian, then mount it on /var/tmp directory. The /var/tmp directory must not already exist.
|
||||
ch-mount /var/tmp/debian.sqfs /var/tmp
|
||||
|
6
sheets/ch-pull2dir
Normal file
6
sheets/ch-pull2dir
Normal file
@ -0,0 +1,6 @@
|
||||
# ch-pull2dir
|
||||
# Utility to pull an image from the Docker Hub and unpack it into a directory. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
# Pull Docker image named alpine:latest from Docker Hub and extract it into a subdirectory of /var/tmp. A temporary tarball will be stored in /var/tmp.
|
||||
ch-pull2dir alpine:latest /var/tmp
|
||||
|
7
sheets/ch-pull2tar
Normal file
7
sheets/ch-pull2tar
Normal file
@ -0,0 +1,7 @@
|
||||
# ch-pull2tar
|
||||
# Utility to pull an image from the Docker Hub and flatten it into a tarball. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
|
||||
# Pull a Docker image named alpine:latest from Docker Hub and flatten it into a Charliecloud tarball in the directory /var/tmp.
|
||||
ch-pull2tar alpine:latest /var/tmp
|
||||
|
6
sheets/ch-run
Normal file
6
sheets/ch-run
Normal file
@ -0,0 +1,6 @@
|
||||
# ch-run
|
||||
# Utility to run a command in a Charliecloud container. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
# Run the command echo hello inside a Charliecloud container using the unpacked image at /data/foo.
|
||||
ch-run /data/foo -- echo hello
|
||||
|
6
sheets/ch-tar2dir
Normal file
6
sheets/ch-tar2dir
Normal file
@ -0,0 +1,6 @@
|
||||
# ch-tar2dir
|
||||
# Utility to unpack a Charliecloud image tarball into a directory. More information: <https://github.com/hpc/charliecloud>.
|
||||
|
||||
# Extract the tarball /var/tmp/hello.tar.gz into a subdirectory of /var/tmp. hello.tar.gz must contain a Linux filesystem image, e.g. as created by ch-builder2tar.
|
||||
ch-tar2dir /var/tmp/hello.tar.gz /var/tmp
|
||||
|
Loading…
Reference in New Issue
Block a user