1CH-BUILD(1)                      Charliecloud                      CH-BUILD(1)
2
3
4

NAME

6       ch-build  - Build an image and place it in the builder's back-end stor‐
7       age
8

SYNOPSIS

10          $ ch-build [-b BUILDER] [--builder-info] -t TAG [ARGS ...] CONTEXT
11

DESCRIPTION

13       Build an image named TAG described by a Dockerfile.  Place  the  result
14       into the builder’s back-end storage.
15
16       Using this script is not required for a working Charliecloud image. You
17       can also use any builder that  can  produce  a  Linux  filesystem  tree
18       directly,  whether or not it is in the list below. However, this script
19       hides the vagaries of making the supported builders work smoothly  with
20       Charliecloud and adds some conveniences (e.g., pass HTTP proxy environ‐
21       ment variables to the build environment if the builder doesn’t do  this
22       by default).
23
24       Supported builders, unprivileged:
25
26          · buildah:  Buildah in “rootless” mode with no setuid helpers, using
27            ch-run (via ch-run-oci) for RUN instructions. This requires  Buil‐
28            dah v1.10.1+; see the install instructions.
29
30          · ch-image: Our internal builder.
31
32       Supported builders, privileged:
33
34          · buildah-runc:  Buildah  in  “rootless”  mode  with setuid helpers,
35            using the default runc for RUN instructions.
36
37          · buildah-setuid: Buildah in “rootless” mode  with  setuid  helpers,
38            using ch-run (via ch-run-oci) for RUN instructions.
39
40          · docker: Docker.
41
42       Specifying the builder, in descending order of priority:
43
44          -b, --builder BUILDER
45                 Command line option.
46
47          $CH_BUILDER
48                 Environment variable
49
50          Default
51                 docker if Docker is installed; otherwise, ch-image.
52
53       Other arguments:
54
55          --builder-info
56                 Print the builder to be used and its version, then exit.
57
58          -f, --file DOCKERFILE
59                 Dockerfile to use (default: $CONTEXT/Dockerfile)
60
61          -t TAG Name (tag) of Docker image to build.
62
63          --help Print help and exit.
64
65          --version
66                 Print version and exit.
67
68       Additional  arguments are accepted and passed unchanged to the underly‐
69       ing builder.
70

BUGS

72       The tag suffix :latest is somewhat misleading, as  by  default  neither
73       ch-build  nor bare builders will notice if the base FROM image has been
74       updated. Use --pull to make sure you have the latest base image.
75

EXAMPLES

77       Create an image tagged foo and specified by the file Dockerfile located
78       in the context directory. Use /bar as the Docker context directory. Use
79       the default builder.
80
81          $ ch-build -t foo /bar
82
83       Equivalent to above:
84
85          $ ch-build -t foo --file=/bar/Dockerfile /bar
86
87       Instead, use /bar/Dockerfile.baz:
88
89          $ ch-build -t foo --file=/bar/Dockerfile.baz /bar
90
91       Equivalent to the first example, but use ch-image  even  if  Docker  is
92       installed:
93
94          $ ch-build -b ch-image -t foo /bar
95
96       Equivalent to above:
97
98          $ export CH_BUILDER=ch-image
99          $ ch-build -t foo /bar
100

REPORTING BUGS

102       If  Charliecloud  was  obtained  from your Linux distribution, use your
103       distribution’s bug reporting procedures.
104
105       Otherwise, report bugs to: <https://github.com/hpc/charliecloud/issues>
106

SEE ALSO

108       charliecloud(7)
109
110       Full documentation at: <https://hpc.github.io/charliecloud>
111
113       2014–2020, Triad National Security, LLC
114
115
116
117
1180.22              2021-03-08 00:00 Coordinated Universal Time      CH-BUILD(1)
Impressum