-
Notifications
You must be signed in to change notification settings - Fork 56
Closed
Description
$ chisel cut --release ubuntu-24.04 --root / base-passwd_data
25.34 error: slice base-passwd_data: invalid content path: /usr/share/base-passwd/group.masterFROM alpine AS get-chisel
ARG CHISEL_VERSION=1.1.0
ARG TARGETARCH
ARG CHISEL_RELEASE="https://github.com/canonical/chisel/releases/download/v${CHISEL_VERSION}/chisel_v${CHISEL_VERSION}_linux_${TARGETARCH}.tar.gz"
# NOTE: `--no-same-owner` used as `chisel` release has ownership of `1001:128`
RUN wget -qO - "${CHISEL_RELEASE}" | tar -xz --no-same-owner -C /usr/local/bin chisel
FROM scratch AS chisel
# Copy over chisel binary and it's external dependency to `ca-certificates.crt`:
COPY --link --from=get-chisel /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt
COPY --link --from=get-chisel /usr/local/bin/chisel /usr/local/bin/chisel
# Provision bash and make it the default shell for `RUN`:
RUN [ "/usr/local/bin/chisel", "cut", "--release", "ubuntu-24.04", "--root", "/", "base-files_base", "bash_bins" ]
SHELL [ "/bin/bash", "-c" ]
# This fails:
RUN chisel cut --release ubuntu-24.04 --root / base-passwd_dataIf the last line is replaced with the following, it would work:
WORKDIR /root-fs
RUN chisel cut --release ubuntu-24.04 --root /root-fs base-passwd_dataI'm not sure if other slices would be similarly affected by this failure for --root /, it is unclear why the slice only fails with --root /? It doesn't seem to be about any conflict with existing directories AFAIK, I have run chisel from a different path than /usr/local/bin/chisel (such as /chisel instead) but it still fails with this error.
NOTE: This same error for the affected slice was reported in June 2022 but was related to a relative --root (using --root ./ or --root . for relative path does not help however).
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels