Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow rootless execution without shellscript #72

Merged
merged 1 commit into from
Aug 30, 2022
Merged

Allow rootless execution without shellscript #72

merged 1 commit into from
Aug 30, 2022

Conversation

ktock
Copy link
Owner

@ktock ktock commented Aug 30, 2022

This commit enables rootless execution without shellscript buildg.sh.
rootlesskit and slirp4netns are still needed.
Arguments for rootlesskit are configurable via --rootlesskit-args or BUILDG_ROOTLESSKIT_ARGS.
Default arguments for rootlesskit are same as ones of buildg.sh

$ buildg debug /tmp/ctx
WARN[2022-08-30T11:50:06+09:00] using host network as the default            
#1 [internal] load .dockerignore
#1 transferring context: 2B done
#1 DONE 0.0s

#2 [internal] load build definition from Dockerfile
#2 transferring dockerfile: 111B done
#2 DONE 0.1s

#3 [internal] load metadata for ghcr.io/stargz-containers/busybox:1.32.0-org
#3 ...

#4 [auth] stargz-containers/busybox:pull token for ghcr.io
#4 DONE 0.0s

#3 [internal] load metadata for ghcr.io/stargz-containers/busybox:1.32.0-org
#3 DONE 1.1s
INFO[2022-08-30T11:50:08+09:00] CACHED [1/2] FROM ghcr.io/stargz-containers/busybox:1.32.0-org@sha256:bde48e1751173b709090c2539fdf12d6ba64e88ec7a4301591227ce925f3c678 
INFO[2022-08-30T11:50:08+09:00] debug session started. type "help" for command reference. 
Filename: "Dockerfile"
 =>   1| FROM ghcr.io/stargz-containers/busybox:1.32.0-org
      2| RUN echo hello > /hello
(buildg) n

#5 [1/2] FROM ghcr.io/stargz-containers/busybox:1.32.0-org@sha256:bde48e1751173b709090c2539fdf12d6ba64e88ec7a4301591227ce925f3c678
#5 resolve ghcr.io/stargz-containers/busybox:1.32.0-org@sha256:bde48e1751173b709090c2539fdf12d6ba64e88ec7a4301591227ce925f3c678 0.0s done
#5 DONE 0.0s

#6 [2/2] RUN echo hello > /hello
INFO[2022-08-30T11:50:09+09:00] detected 127.0.0.53 nameserver, assuming systemd-resolved, so using resolv.conf: /run/systemd/resolve/resolv.conf 
Filename: "Dockerfile"
      1| FROM ghcr.io/stargz-containers/busybox:1.32.0-org
 =>   2| RUN echo hello > /hello
(buildg) exec echo hello
hello

Signed-off-by: Kohei Tokunaga <ktokunaga.mail@gmail.com>
@ktock ktock merged commit 2057c88 into main Aug 30, 2022
@ktock ktock deleted the rootlessdev branch August 30, 2022 05:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant