Conversation
| with open(config_path, "w", encoding="utf_8") as config: | ||
| config.write(f"FORCE_TIMESTAMPS={args.force_timestamps}\n") | ||
| config.write(f"CHROOT={args.chroot or args.bwrap}\n") | ||
| config.write(f"CHROOT={args.chroot or args.bwrap or args.docker}\n") |
There was a problem hiding this comment.
Not something that needs changing in this PR, but in the future, we might want to rename this variable to something more descriptive, like USERSPACE_ONLY (especially if/when I go through with adding the WSL bootstrap mode I'm planning).
| if args.docker: | ||
| args.external_sources = True | ||
|
|
| generator.prepare(target, using_kernel=False) | ||
| arch = stage0_arch_map.get(args.arch, args.arch) | ||
| init = os.path.join(os.sep, 'bootstrap-seeds', 'POSIX', arch, 'kaem-optional-seed') | ||
| print(generator.target_dir, init) |
steps/improve/finalize_fhs.sh
Outdated
| # Add /etc/resolv.conf | ||
| echo 'nameserver 1.1.1.1' > /etc/resolv.conf | ||
| echo 'nameserver 1.1.1.1' > /etc/resolv.conf.head | ||
| if [ "${EXTERNAL_SOURCES}" = "False" ]; then |
There was a problem hiding this comment.
Again, is this the only way to do this? Wouldn't it work to have a ${DOCKER} to disable writing resolv.conf, and still retain the ability to run without predownloading everything on the host?
|
|
||
| FROM scratch as build | ||
| ADD target/ / | ||
| RUN ["/bootstrap-seeds/POSIX/x86/kaem-optional-seed"] |
There was a problem hiding this comment.
Pass "arch" from bootstrap() here, if possible, rather than hardcoding "x86".
|
|
||
| FROM build as install | ||
| ENV PATH=/bin:/usr/sbin:/usr/bin | ||
| RUN set -eux; \ |
There was a problem hiding this comment.
is the inclusion of the "x" flag intentional here, or just leftover from debugging?
| # SPDX-License-Identifier: GPL-3.0-or-later | ||
|
|
||
| FROM scratch as build | ||
| ADD target/ / |
There was a problem hiding this comment.
Pass target directory from bootstrap() here, if possible, rather than hardcoding "target".
| @@ -16,8 +16,58 @@ mount | grep '/sys' &> /dev/null || (mkdir -p /sys; mount -t sysfs sysfs /sys) | |||
| mount | grep '/tmp' &> /dev/null || (mkdir -p /tmp; mount -t tmpfs tmpfs /tmp) | |||
There was a problem hiding this comment.
typo: resolv.conf.head
| if [ "${EXTERNAL_SOURCES}" = "False" ]; then | ||
| # Add /etc/resolv.conf | ||
| if [ "${CHROOT}" = False ]; then | ||
| rm /etc/mtab |
There was a problem hiding this comment.
Won't this conflict with later steps?
|
@lrvick thanks for the docker support. I rebased your branch with the latest in master and have included a commit incorporating feedback in this PR. I did not want to open a redundant PR, but my changes can be found here. Thank you @stikonas, @Googulator and other contributors for all your efforts. |
|
Hi @Nauscar, feel free to open a new PR that supersedes this one :) |
Support building live-bootstrap as a deterministic docker image.
An image can be exported after build with:
Expected hash as of this PR is: