Skip to content

[WIP] rootless devbox#7333

Draft
pingsutw wants to merge 1 commit intomainfrom
rootless-devbox
Draft

[WIP] rootless devbox#7333
pingsutw wants to merge 1 commit intomainfrom
rootless-devbox

Conversation

@pingsutw
Copy link
Copy Markdown
Member

@pingsutw pingsutw commented May 1, 2026

Tracking issue

Why are the changes needed?

What changes were proposed in this pull request?

How was this patch tested?

Labels

Please add one or more of the following labels to categorize your PR:

  • added: For new features.
  • changed: For changes in existing functionality.
  • deprecated: For soon-to-be-removed features.
  • removed: For features being removed.
  • fixed: For any bug fixed.
  • security: In case of vulnerabilities

This is important to improve the readability of release notes.

Setup process

Screenshots

Check all the applicable boxes

  • I updated the documentation accordingly.
  • All new and existing tests passed.
  • All commits are signed-off.

Related PRs

Stack

If you do use git town to manage PR Stacks, the stack relevant to this PR
will show below. Otherwise, you can ignore this section.

Docs link

Signed-off-by: Kevin Su <pingsutw@apache.org>
Copilot AI review requested due to automatic review settings May 1, 2026 20:58
@github-actions github-actions Bot added the flyte2 label May 1, 2026
@pingsutw pingsutw self-assigned this May 1, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a rootless variant of the devbox container image to support running k3s without privileged capabilities (e.g., in restricted Kubernetes/Knative environments).

Changes:

  • Add a build-rootless Makefile target to build a new rootless devbox image.
  • Introduce Dockerfile.rootless that builds a Debian-based image intended to run k3s in rootless mode, with preloaded images/manifests and embedded Postgres support.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.

File Description
docker/devbox-bundled/Makefile Adds a build-rootless target to build/tag the rootless image.
docker/devbox-bundled/Dockerfile.rootless New Debian-based Dockerfile for a rootless k3s devbox variant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +144 to +146
ENV HOME=/home/flyte
ENV XDG_RUNTIME_DIR=/home/flyte/.run

# Install k3s binary
RUN set -ex; \
K3S_ARCH=$([ "$TARGETARCH" = "arm64" ] && echo "-arm64" || echo ""); \
curl -fL "https://github.com/k3s-io/k3s/releases/download/${K3S_VERSION}/k3s${K3S_ARCH}" -o /usr/local/bin/k3s; \
Comment on lines +147 to +150
VOLUME /var/lib/flyte/storage

USER flyte
WORKDIR /home/flyte
Comment on lines +124 to +128
# Stage k3s air-gapped images and manifests under the flyte user's home so
# rootless k3s (which uses ~/.rancher/k3s/...) can pick them up.
COPY --from=builder /build/images/ /home/flyte/.rancher/k3s/agent/images/
COPY images/tar/${TARGETARCH}/ /home/flyte/.rancher/k3s/agent/images/
COPY manifests/ /home/flyte/.rancher/k3s/server/manifests-staging/
USER flyte
WORKDIR /home/flyte

ENTRYPOINT [ "/usr/local/bin/k3d-entrypoint-rootless.sh" ]
@pingsutw pingsutw marked this pull request as draft May 3, 2026 01:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants