mirror of
https://github.com/clearlinux/dockerfiles.git
synced 2026-09-01 02:35:02 +00:00
8710d447d3
During the 1st stage build of multi-stage build, when run swupd os-install, the swupd state data are saved to /swupd_state, which will not be copied to the target. So we do not need to remove swupd state data. Signed-off-by: Liu, Jianjun <jianjun.liu@intel.com>
19 lines
476 B
Docker
19 lines
476 B
Docker
FROM clearlinux:latest AS builder
|
|
|
|
ARG swupd_args
|
|
|
|
# Move to latest Clear Linux release
|
|
RUN swupd update --no-boot-update $swupd_args
|
|
|
|
# Install clean os-core bundle in target directory
|
|
# using the new os version
|
|
RUN source /usr/lib/os-release \
|
|
&& mkdir /install_root \
|
|
&& swupd os-install -V ${VERSION_ID} \
|
|
--path /install_root --statedir /swupd-state \
|
|
--bundles=os-core --no-boot-update
|
|
|
|
FROM scratch
|
|
COPY --from=builder /install_root /
|
|
CMD ["/bin/bash"]
|