Skip to content
This repository has been archived by the owner on Oct 2, 2024. It is now read-only.

Commit

Permalink
docs + comments
Browse files Browse the repository at this point in the history
  • Loading branch information
lucaudill committed Jul 24, 2024
1 parent 32efbe4 commit f4b1ba7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 4 deletions.
20 changes: 20 additions & 0 deletions doc/ch-image.rst
Original file line number Diff line number Diff line change
Expand Up @@ -594,6 +594,8 @@ not allowed in Git branch names), and the empty base of everything
common instruction :code:`RUN echo foo`.


.. _ch-image_build:

:code:`build`
=============

Expand Down Expand Up @@ -2139,6 +2141,24 @@ Options:
:code:`-S`, :code:`--shell SHELL`
Use :code:`SHELL` instead of the default :code:`/bin/sh`.

The following options are shared with :code:`ch-image build`. For more details
about these options, see the section on :ref:`build <ch-image_build>`.

:code:`-b`, :code:`--bind SRC[:DST]`
For :code:`RUN` instructions only, bind-mount :code:`SRC` at guest
:code:`DST`.

:code:`--build-arg KEY[=VALUE]`
Set build-time variable :code:`KEY` defined by :code:`ARG` instruction
to :code:`VALUE`.

:code:`--force[=MODE]`
Use unprivileged build with root emulation mode :code:`MODE`.

:code:`--force-cmd=CMD,ARG1[,ARG2...]`
If command :code:`CMD` is found in a :code:`RUN` instruction, add the
comma-separated :code:`ARGs` to it.

:code:`ch-image modify` operates in one of the following three modes. If the
mode desired is ambiguous, that is an error.

Expand Down
8 changes: 5 additions & 3 deletions lib/modify.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,11 @@ def main(cli_):
global cli
cli = cli_

# build.py assumes that global cli comes from the “build” function. If we
# don’t assign these values, the program will fail after trying to access
# them. FIXME: Can partially fix this by adding command line opts.
# CLI opts that “build.py” expects, but that don’t make sense in the context
# of “modify”. We set “parse_only” to “False” because we don’t do any
# parsing, and “context” to the root of the filesystem to ensure that
# necessary files (e.g. the modify script) will always be somewhere in the
# context dir.
cli.parse_only = False
cli.context = os.path.abspath(os.sep)

Expand Down
1 change: 0 additions & 1 deletion test/run/ch-run_misc.bats
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ demand-overlayfs () {

@test 'relative path to image' { # issue #6
scope full
# shellcheck disable=SC2154
cd "$(dirname "$ch_timg")" && ch-run "$(basename "$ch_timg")" -- /bin/true
}

Expand Down

0 comments on commit f4b1ba7

Please sign in to comment.