1CH-BUILD(1) Charliecloud CH-BUILD(1)
2
3
4
6 ch-build - Build an image and place it in the builder's back-end stor‐
7 age
8
10 $ ch-build [-b BUILDER] [--builder-info] -t TAG [ARGS ...] CONTEXT
11
13 WARNING:
14 This script is deprecated in favor of using the desired builder di‐
15 rectly; we have added some tips for Docker to the FAQ. It will be
16 removed in the next release.
17
18 Build an image named TAG described by a Dockerfile. Place the result
19 into the builder’s back-end storage.
20
21 Using this script is not required for a working Charliecloud image. You
22 can also use any builder that can produce a Linux filesystem tree di‐
23 rectly, whether or not it is in the list below. However, this script
24 hides the vagaries of making the supported builders work smoothly with
25 Charliecloud and adds some conveniences (e.g., pass HTTP proxy environ‐
26 ment variables to the build environment if the builder doesn’t do this
27 by default).
28
29 Supported builders, unprivileged:
30
31 • ch-image: Our internal builder.
32
33 Supported builders, privileged:
34
35 • docker: Docker.
36
37 Experimental builders (i.e., the code is there but not tested much):
38
39 • buildah: Buildah in “rootless” mode with no setuid helpers, using
40 ch-run (via ch-run-oci) for RUN instructions. This mode is fully
41 unprivileged.
42
43 • buildah-runc: Buildah in “rootless” mode with setuid helpers, us‐
44 ing the default runc for RUN instructions.
45
46 • buildah-setuid: Buildah in “rootless” mode with setuid helpers,
47 using ch-run (via ch-run-oci) for RUN instructions.
48
49 Specifying the builder, in descending order of priority:
50
51 -b, --builder BUILDER
52 Command line option.
53
54 $CH_BUILDER
55 Environment variable
56
57 Default
58 docker if Docker is installed; otherwise, ch-image.
59
60 Other arguments:
61
62 --builder-info
63 Print the builder to be used and its version, then exit.
64
65 -f, --file DOCKERFILE
66 Dockerfile to use (default: $CONTEXT/Dockerfile)
67
68 -t TAG Name (tag) of Docker image to build.
69
70 --help Print help and exit.
71
72 --version
73 Print version and exit.
74
75 Additional arguments are accepted and passed unchanged to the underly‐
76 ing builder.
77
79 The tag suffix :latest is somewhat misleading, as by default neither
80 ch-build nor bare builders will notice if the base FROM image has been
81 updated. Use --pull to make sure you have the latest base image.
82
84 Create an image tagged foo and specified by the file Dockerfile located
85 in the context directory. Use /bar as the Docker context directory. Use
86 the default builder.
87
88 $ ch-build -t foo /bar
89
90 Equivalent to above:
91
92 $ ch-build -t foo --file=/bar/Dockerfile /bar
93
94 Instead, use /bar/Dockerfile.baz:
95
96 $ ch-build -t foo --file=/bar/Dockerfile.baz /bar
97
98 Equivalent to the first example, but use ch-image even if Docker is in‐
99 stalled:
100
101 $ ch-build -b ch-image -t foo /bar
102
103 Equivalent to above:
104
105 $ export CH_BUILDER=ch-image
106 $ ch-build -t foo /bar
107
109 If Charliecloud was obtained from your Linux distribution, use your
110 distribution’s bug reporting procedures.
111
112 Otherwise, report bugs to: https://github.com/hpc/charliecloud/issues
113
115 charliecloud(7)
116
117 Full documentation at: <https://hpc.github.io/charliecloud>
118
120 2014–2021, Triad National Security, LLC
121
122
123
124
1250.26 2022-07-20 00:00 UTC CH-BUILD(1)