Skip to content

Commit 95ff32c

Browse files
committed
install: Drop --net=none suggestion
While it's actually nice to show that the container can just install itself, I'm trying to reduce the command line length of the invocation in the interest of simplicity. There's a minor cost here as it means we'll get a default bridge network, but that hardly matters. Anyone who wants to avoid it can just specify `--net=none` on their own. However this said, I think longer term we do want to support networking at install time in order to do things like fetch configmaps, so dropping this is prep for that too. Signed-off-by: Colin Walters <[email protected]>
1 parent 491e131 commit 95ff32c

File tree

3 files changed

+4
-9
lines changed

3 files changed

+4
-9
lines changed

docs/install.md

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ other options.
4747
Here's an example:
4848

4949
```
50-
$ podman run --privileged --pid=host --net=none --security-opt label=type:unconfined_t <image> bootc install --target-no-signature-verification /path/to/disk
50+
$ podman run --privileged --pid=host --security-opt label=type:unconfined_t <image> bootc install --target-no-signature-verification /path/to/disk
5151
```
5252

5353
Note that while `--privileged` is used, this command will not
@@ -57,11 +57,6 @@ The `--pid=host --security-opt label=type:unconfined_t` today
5757
make it more convenient for bootc to perform some privileged
5858
operations; in the future these requirement may be dropped.
5959

60-
The `--net=none` argument is just to emphasize the fact that
61-
an installation by default is not fetching anything else external
62-
from the network - the content to be installed
63-
*is the running container image content*.
64-
6560
### Operating system install configuration required
6661

6762
The container image must define its default install configuration. For example,
@@ -193,7 +188,7 @@ support the root storage setup already initialized.
193188
The core command should look like this:
194189

195190
```
196-
$ podman run --privileged -v /:/target --pid=host --net=none --security-opt label=type:install_t \
191+
$ podman run --privileged -v /:/target --pid=host --security-opt label=type:install_t \
197192
<image> \
198193
bootc install-to-filesystem --replace=alongside /target
199194
```

lib/src/privtests.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ fn test_install_filesystem(image: &str, blockdev: &Utf8Path) -> Result<()> {
152152
let mountpoint: &Utf8Path = mountpoint_dir.path().try_into().unwrap();
153153

154154
// And run the install
155-
cmd!(sh, "podman run --rm --privileged --pid=host --net=none --env=RUST_LOG -v /usr/bin/bootc:/usr/bin/bootc -v {mountpoint}:/target-root {image} bootc install-to-filesystem /target-root").run()?;
155+
cmd!(sh, "podman run --rm --privileged --pid=host --env=RUST_LOG -v /usr/bin/bootc:/usr/bin/bootc -v {mountpoint}:/target-root {image} bootc install-to-filesystem /target-root").run()?;
156156

157157
cmd!(sh, "umount -R {mountpoint}").run()?;
158158

tests/kolainst/install

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ cd $(mktemp -d)
1919

2020
case "${AUTOPKGTEST_REBOOT_MARK:-}" in
2121
"")
22-
podman run --rm -ti --privileged --pid=host --net=none -v /usr/bin/bootc:/usr/bin/bootc ${IMAGE} bootc install --karg=foo=bar ${DEV}
22+
podman run --rm -ti --privileged --pid=host -v /usr/bin/bootc:/usr/bin/bootc ${IMAGE} bootc install --karg=foo=bar ${DEV}
2323
# In theory we could e.g. wipe the bootloader setup on the primary disk, then reboot;
2424
# but for now let's just sanity test that the install command executes.
2525
lsblk ${DEV}

0 commit comments

Comments
 (0)