Lines Matching +full:user +full:- +full:defined
1 .. SPDX-License-Identifier: GPL-2.0-only
14 problems once and for all (e.g. user id management). It also makes it easier
25 scripts/container -i IMAGE [OPTION]... CMD...
29 ``-e, --env-file ENV_FILE``
33 ``-g, --gid GID``
37 ``-i, --image IMAGE``
41 ``-r, --runtime RUNTIME``
48 ``-s, --shell``
52 ``-u, --uid UID``
54 User id to use inside the container.
56 If the ``-g`` option is not specified, the user id will also be used for
59 ``-v, --verbose``
63 ``-h, --help``
71 It's entirely up to the user to choose which image to use and the ``CMD``
74 working directory and adjust the user and group id as needed.
77 provided by the user and selected via the ``-i`` option. The container runtime
78 can be selected with the ``-r`` option, which can be either ``docker`` or
83 By default, commands are run non-interactively. The user can abort a running
84 container with SIGINT (Ctrl-C). To run commands interactively with a TTY, the
85 ``--shell`` or ``-s`` option can be used. Signals will then be received by the
87 interactive shell, use Ctrl-D or ``exit``.
96 Out-of-tree builds are not fully supported yet. The ``O=`` option can
99 ``mount --bind``, see the examples section further down.
106 either defined in the image itself or via the ``-e`` option using an
107 environment file. In some cases it makes more sense to have them defined in
108 the Containerfile used to create the image. For example, a Clang-only compiler
109 toolchain image may have ``LLVM=1`` defined.
111 The local environment file is more useful for user-specific variables added
112 during development. It is passed as-is to the container runtime so its format
122 scripts/container -i docker.io/tuxmake/korg-clang LLVM=1 make # won't work
126 scripts/container -i docker.io/tuxmake/korg-clang make LLVM=1
129 User IDs
133 container runtime. The goal is to run commands as the user invoking the tool.
134 With Podman, a namespace is created to map the current user id to a different
138 with the current user id directly. In both cases, this will provide the same
140 difference is that when using Docker without a namespace, the user id may not
143 Say, we're using an image which sets up a default user with id 1000 and the
144 current user calling the ``container`` tool has id 1234. The kernel source
145 tree was checked out by this same user so the files belong to user 1234. With
146 Podman, the container will be running as user id 1000 with a mapping to id 1234
149 with user id 1234 which can access the files in the volume but not in the user
157 <https://podman-desktop.io/docs/migrating-from-docker/managing-docker-compatibility>`__
170 scripts/container -i docker.io/tuxmake/korg-clang -- make LLVM=1 defconfig
171 scripts/container -i docker.io/tuxmake/korg-clang -- make LLVM=1 -j$(nproc)
176 separated with a double dash ``--`` to not confuse them with the
180 scripts/container -i docker.io/tuxmake/korg-clang make mrproper
184 scripts/container -i perl:slim-trixie scripts/checkpatch.pl patches/*
191 <https://gitlab.com/gtucker/korg-containers>`__ by running ``make
196 scripts/container -i kernel.org/clang -- make bzImage -j$(nproc)
200 scripts/container -i kernel.org/gcc:15 -- make bzImage -j$(nproc)
202 For an out-of-tree build, a trick is to bind-mount the destination directory to
205 mkdir -p $HOME/tmp/my-kernel-build
206 mkdir -p build
207 sudo mount --bind $HOME/tmp/my-kernel-build build
208 scripts/container -i kernel.org/gcc -- make mrproper
209 scripts/container -i kernel.org/gcc -- make O=build defconfig
210 scripts/container -i kernel.org/gcc -- make O=build -j$(nproc)
214 scripts/container -s -i kernel.org/gcc:kunit -- \
217 --arch=x86_64 \
218 --cross_compile=x86_64-linux-
222 scripts/container -si kernel.org/gcc bash
227 scripts/container -i kernel.org/kdocs make htmldocs