-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from cilium/markpash/optimizations
root-*: install fewer packages and use zstd for compression
- Loading branch information
Showing
2 changed files
with
16 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
# vim: set ft=dockerfile: | ||
FROM quay.io/lvh-images/root-builder AS builder | ||
COPY _data /data | ||
WORKDIR /data | ||
# mmdebstrap outputs messages in stderr, so we redirect stderr | ||
RUN lvh images build --dir . 2>&1 | ||
RUN lvh images build --dir /data 2>&1 | ||
RUN zstd --compress --rm --threads=0 /data/images/*.qcow2 | ||
|
||
# Can't use scratch here because we use `docker create` elsewhere, and | ||
# that doesn't work without an explicit command. Satisfy this with | ||
# busybox. | ||
FROM busybox | ||
COPY --from=builder /data/images/base.qcow2 /data/images/base.qcow2 | ||
RUN gzip /data/images/base.qcow2 | ||
COPY --from=builder /data/images /data/images |