Skip to content

Allow rootless execution without shellscript#72

Merged
ktock merged 1 commit intomainfrom
rootlessdev
Aug 30, 2022
Merged

Allow rootless execution without shellscript#72
ktock merged 1 commit intomainfrom
rootlessdev

Conversation

@ktock
Copy link
Copy Markdown
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

@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