aurora/Containerfile
2023-03-08 14:11:21 -05:00

50 lines
No EOL
2.6 KiB
Docker

ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-silverblue}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
ARG SOURCE_IMAGE="${SOURCE_IMAGE:-$BASE_IMAGE_NAME-$IMAGE_FLAVOR}"
ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-37}"
FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS builder
ARG IMAGE_NAME="${IMAGE_NAME}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"
COPY etc /etc
COPY usr /usr
RUN wget https://github.com/terrapkg/subatomic-repos/raw/main/terra.repo -O /etc/yum.repos.d/terra.repo
RUN wget https://copr.fedorainfracloud.org/coprs/kylegospo/gnome-vrr/repo/fedora-$(rpm -E %fedora)/kylegospo-gnome-vrr-fedora-$(rpm -E %fedora).repo -O /etc/yum.repos.d/_copr_kylegospo-gnome-vrr.repo
RUN wget https://copr.fedorainfracloud.org/coprs/sunwire/input-remapper/repo/fedora-${FEDORA_MAJOR_VERSION}/sunwire-input-remapper-fedora-${FEDORA_MAJOR_VERSION}.repo -O /etc/yum.repos.d/sunwire-input-remapper-fedora-${FEDORA_MAJOR_VERSION}.repo
RUN wget https://copr.fedorainfracloud.org/coprs/kylegospo/webapp-manager/repo/fedora-${FEDORA_MAJOR_VERSION}/kylegospo-webapp-manager-fedora-${FEDORA_MAJOR_VERSION}.repo -O /etc/yum.repos.d/kylegospo-webapp-manager-fedora-${FEDORA_MAJOR_VERSION}.repo
RUN rpm-ostree override replace --experimental --from repo=copr:copr.fedorainfracloud.org:kylegospo:gnome-vrr mutter gnome-control-center gnome-control-center-filesystem
RUN rpm-ostree override remove gnome-software-rpm-ostree firefox firefox-langpacks
ADD packages.json /tmp/packages.json
RUN /tmp/build.sh \
systemctl unmask dconf-update.service && \
systemctl enable dconf-update.service && \
systemctl enable rpm-ostree-countme.service && \
systemctl enable tailscaled.service && \
fc-cache -f /usr/share/fonts/ubuntu && \
rm -f /etc/yum.repos.d/terra.repo && \
rm -f /etc/yum.repos.d/_copr_kylegospo-gnome-vrr.repo && \
rm -f /etc/yum.repos.d/tailscale.repo && \
rm -f /etc/yum.repos.d/sunwire-input-remapper-fedora-37.repo && \
rm -f /etc/yum.repos.d/kylegospo-webapp-manager-fedora-37.repo && \
sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/user.conf && \
sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/system.conf && \
/tmp/post-install.sh && \
rm -rf /tmp/* /var/* && \
ostree container commit && \
mkdir -p /var/tmp && chmod -R 1777 /var/tmp
# K8s tools
COPY --from=cgr.dev/chainguard/kubectl:latest /usr/bin/kubectl /usr/bin/kubectl
COPY --from=cgr.dev/chainguard/cosign:latest /usr/bin/cosign /usr/bin/cosign
RUN curl -Lo ./kind "https://kind.sigs.k8s.io/dl/v0.17.0/kind-$(uname)-amd64"
RUN chmod +x ./kind
RUN mv ./kind /usr/bin/kind