Merge pull request #11 from ublue-os/build-script
feat: switch to separate build script
This commit is contained in:
@@ -1,25 +1,24 @@
|
||||
ARG FEDORA_MAJOR_VERSION=37
|
||||
|
||||
# change this line if you want to change the image
|
||||
FROM ghcr.io/ublue-os/silverblue-main:${FEDORA_MAJOR_VERSION}
|
||||
|
||||
# copy over configuration files
|
||||
COPY etc /etc
|
||||
# COPY usr /usr
|
||||
|
||||
COPY ublue-firstboot /usr/bin
|
||||
COPY recipe.yml /etc/ublue-recipe.yml
|
||||
|
||||
# yq used in build.sh and the setup-flatpaks recipe to read the recipe.yml
|
||||
# copied from the official container image as it's not avaible as an rpm
|
||||
COPY --from=docker.io/mikefarah/yq /usr/bin/yq /usr/bin/yq
|
||||
|
||||
RUN rpm-ostree override remove firefox firefox-langpacks
|
||||
|
||||
RUN echo "-- Installing RPMs defined in recipe.yml --" && \
|
||||
rpm_packages=$(yq '.rpms[]' < /etc/ublue-recipe.yml) && \
|
||||
for pkg in $rpm_packages; do \
|
||||
echo "Installing: ${pkg}" && \
|
||||
rpm-ostree install $pkg; \
|
||||
done && \
|
||||
echo "---"
|
||||
# copy and run the build script
|
||||
COPY build.sh /tmp/build.sh
|
||||
RUN chmod +x /tmp/build.sh && /tmp/build.sh
|
||||
|
||||
# clean up and finalize container build
|
||||
RUN rm -rf \
|
||||
/tmp/* \
|
||||
/var/* && \
|
||||
|
||||
10
build.sh
Normal file
10
build.sh
Normal file
@@ -0,0 +1,10 @@
|
||||
# remove the default firefox (from fedora) in favor of the flatpak
|
||||
rpm-ostree override remove firefox firefox-langpacks
|
||||
|
||||
echo "-- Installing RPMs defined in recipe.yml --"
|
||||
rpm_packages=$(yq '.rpms[]' < /etc/ublue-recipe.yml)
|
||||
for pkg in $rpm_packages; do \
|
||||
echo "Installing: ${pkg}" && \
|
||||
rpm-ostree install $pkg; \
|
||||
done
|
||||
echo "---"
|
||||
Reference in New Issue
Block a user