2023-03-08 09:57:15 -09:00
|
|
|
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME:-silverblue}"
|
|
|
|
|
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR:-main}"
|
2023-10-13 08:19:51 -08:00
|
|
|
ARG AKMODS_FLAVOR="${AKMODS_FLAVOR:-main}"
|
2023-03-08 09:57:15 -09:00
|
|
|
ARG SOURCE_IMAGE="${SOURCE_IMAGE:-$BASE_IMAGE_NAME-$IMAGE_FLAVOR}"
|
|
|
|
|
ARG BASE_IMAGE="ghcr.io/ublue-os/${SOURCE_IMAGE}"
|
2023-11-08 07:53:57 -09:00
|
|
|
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-39}"
|
2023-06-18 18:42:33 -08:00
|
|
|
ARG TARGET_BASE="${TARGET_BASE:-bluefin}"
|
2023-03-08 09:57:15 -09:00
|
|
|
|
2023-09-02 08:56:56 -08:00
|
|
|
## bluefin image section
|
2023-08-15 12:59:56 -08:00
|
|
|
FROM ${BASE_IMAGE}:${FEDORA_MAJOR_VERSION} AS bluefin
|
2023-03-08 09:57:15 -09:00
|
|
|
|
2023-09-23 11:01:43 -08:00
|
|
|
ARG IMAGE_NAME="${IMAGE_NAME}"
|
2023-10-20 09:01:52 -08:00
|
|
|
ARG IMAGE_VENDOR="${IMAGE_VENDOR}"
|
2023-09-23 11:01:43 -08:00
|
|
|
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}"
|
2023-10-13 08:19:51 -08:00
|
|
|
ARG AKMODS_FLAVOR="${AKMODS_FLAVOR}"
|
|
|
|
|
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}"
|
2023-03-08 09:57:15 -09:00
|
|
|
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"
|
2023-09-02 08:56:56 -08:00
|
|
|
ARG PACKAGE_LIST="bluefin"
|
2023-03-08 10:11:21 -09:00
|
|
|
|
2023-12-16 16:34:10 -09:00
|
|
|
# GNOME VRR & Prompt
|
2023-12-13 11:01:42 -09:00
|
|
|
RUN if [ ${FEDORA_MAJOR_VERSION} -ge "39" ]; then \
|
|
|
|
|
wget https://copr.fedorainfracloud.org/coprs/kylegospo/gnome-vrr/repo/fedora-"${FEDORA_MAJOR_VERSION}"/kylegospo-gnome-vrr-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/_copr_kylegospo-gnome-vrr.repo && \
|
|
|
|
|
rpm-ostree override replace --experimental --from repo=copr:copr.fedorainfracloud.org:kylegospo:gnome-vrr mutter mutter-common gnome-control-center gnome-control-center-filesystem && \
|
2023-12-16 16:34:10 -09:00
|
|
|
rm -f /etc/yum.repos.d/_copr_kylegospo-gnome-vrr.repo && \
|
|
|
|
|
wget https://copr.fedorainfracloud.org/coprs/kylegospo/prompt/repo/fedora-$(rpm -E %fedora)/kylegospo-prompt-fedora-$(rpm -E %fedora).repo?arch=x86_64 -O /etc/yum.repos.d/_copr_kylegospo-prompt.repo && \
|
|
|
|
|
rpm-ostree override replace \
|
|
|
|
|
--experimental \
|
|
|
|
|
--from repo=copr:copr.fedorainfracloud.org:kylegospo:prompt \
|
|
|
|
|
vte291 \
|
|
|
|
|
vte-profile && \
|
|
|
|
|
rpm-ostree install \
|
|
|
|
|
prompt && \
|
2024-01-29 13:34:18 -09:00
|
|
|
rm -f /etc/yum.repos.d/_copr_kylegospo-prompt.repo && \
|
|
|
|
|
rpm-ostree override remove \
|
|
|
|
|
power-profiles-daemon \
|
|
|
|
|
|| true && \
|
|
|
|
|
rpm-ostree override remove \
|
|
|
|
|
tlp \
|
|
|
|
|
tlp-rdw \
|
|
|
|
|
|| true \
|
2023-12-13 11:01:42 -09:00
|
|
|
; fi
|
2023-10-27 11:19:57 -08:00
|
|
|
|
2023-03-08 09:57:15 -09:00
|
|
|
COPY usr /usr
|
2023-09-24 14:54:36 -08:00
|
|
|
COPY just /tmp/just
|
2023-08-27 16:12:00 -08:00
|
|
|
COPY etc/yum.repos.d/ /etc/yum.repos.d/
|
2023-09-02 08:56:56 -08:00
|
|
|
COPY packages.json /tmp/packages.json
|
|
|
|
|
COPY build.sh /tmp/build.sh
|
2023-09-23 11:01:43 -08:00
|
|
|
COPY image-info.sh /tmp/image-info.sh
|
2024-01-30 13:22:04 -09:00
|
|
|
COPY fetch-quadlets.sh /tmp/fetch-quadlets.sh
|
2023-10-05 12:18:15 -08:00
|
|
|
# Copy ublue-update.toml to tmp first, to avoid being overwritten.
|
|
|
|
|
COPY usr/etc/ublue-update/ublue-update.toml /tmp/ublue-update.toml
|
2023-03-08 09:57:15 -09:00
|
|
|
|
2023-10-12 12:53:51 -08:00
|
|
|
# Add ublue kmods, add needed negativo17 repo and then immediately disable due to incompatibility with RPMFusion
|
2023-10-13 08:19:51 -08:00
|
|
|
COPY --from=ghcr.io/ublue-os/akmods:${AKMODS_FLAVOR}-${FEDORA_MAJOR_VERSION} /rpms /tmp/akmods-rpms
|
|
|
|
|
RUN sed -i 's@enabled=0@enabled=1@g' /etc/yum.repos.d/_copr_ublue-os-akmods.repo && \
|
2023-10-12 12:53:51 -08:00
|
|
|
wget https://negativo17.org/repos/fedora-multimedia.repo -O /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
|
|
|
|
|
if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then \
|
|
|
|
|
rpm-ostree install \
|
|
|
|
|
/tmp/akmods-rpms/kmods/*xpadneo*.rpm \
|
|
|
|
|
/tmp/akmods-rpms/kmods/*xone*.rpm \
|
|
|
|
|
/tmp/akmods-rpms/kmods/*openrazer*.rpm \
|
|
|
|
|
/tmp/akmods-rpms/kmods/*v4l2loopback*.rpm \
|
|
|
|
|
/tmp/akmods-rpms/kmods/*wl*.rpm \
|
|
|
|
|
; fi && \
|
2023-11-04 13:36:45 -08:00
|
|
|
if grep -qv "asus" <<< "${AKMODS_FLAVOR}"; then \
|
|
|
|
|
rpm-ostree install \
|
|
|
|
|
/tmp/akmods-rpms/kmods/*evdi*.rpm \
|
|
|
|
|
; fi && \
|
2024-01-28 15:02:38 -09:00
|
|
|
sed -i 's@enabled=1@enabled=0@g' /etc/yum.repos.d/negativo17-fedora-multimedia.repo && \
|
|
|
|
|
wget https://copr.fedorainfracloud.org/coprs/che/nerd-fonts/repo/fedora-"${FEDORA_MAJOR_VERSION}"/che-nerd-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/_copr_che-nerd-fonts-"${FEDORA_MAJOR_VERSION}".repo
|
2023-10-12 12:53:51 -08:00
|
|
|
|
2023-09-21 14:45:33 -08:00
|
|
|
# Starship Shell Prompt
|
|
|
|
|
RUN curl -Lo /tmp/starship.tar.gz "https://github.com/starship/starship/releases/latest/download/starship-x86_64-unknown-linux-gnu.tar.gz" && \
|
|
|
|
|
tar -xzf /tmp/starship.tar.gz -C /tmp && \
|
|
|
|
|
install -c -m 0755 /tmp/starship /usr/bin && \
|
|
|
|
|
echo 'eval "$(starship init bash)"' >> /etc/bashrc
|
|
|
|
|
|
2024-01-26 14:00:31 -09:00
|
|
|
RUN wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
|
2023-09-30 19:14:49 -08:00
|
|
|
/tmp/build.sh && \
|
2023-09-23 11:01:43 -08:00
|
|
|
/tmp/image-info.sh && \
|
2024-01-30 13:22:04 -09:00
|
|
|
/tmp/fetch-quadlets.sh && \
|
2023-03-16 11:54:44 -08:00
|
|
|
pip install --prefix=/usr yafti && \
|
2024-01-03 20:02:47 -09:00
|
|
|
pip install --prefix=/usr topgrade && \
|
2024-01-26 14:00:31 -09:00
|
|
|
rpm-ostree install ublue-update && \
|
2023-10-01 10:49:26 -08:00
|
|
|
mkdir -p /usr/etc/flatpak/remotes.d && \
|
|
|
|
|
wget -q https://dl.flathub.org/repo/flathub.flatpakrepo -P /usr/etc/flatpak/remotes.d && \
|
2023-10-05 12:18:15 -08:00
|
|
|
cp /tmp/ublue-update.toml /usr/etc/ublue-update/ublue-update.toml && \
|
2024-01-29 13:34:18 -09:00
|
|
|
if [[ "${FEDORA_MAJOR_VERSION}" -ge "39" ]]; then \
|
|
|
|
|
systemctl enable tuned.service \
|
|
|
|
|
; fi && \
|
2023-03-08 09:57:15 -09:00
|
|
|
systemctl enable rpm-ostree-countme.service && \
|
|
|
|
|
systemctl enable tailscaled.service && \
|
2023-08-28 13:19:53 -08:00
|
|
|
systemctl enable dconf-update.service && \
|
2023-10-23 11:44:33 -08:00
|
|
|
systemctl enable ublue-update.timer && \
|
2023-10-01 10:49:26 -08:00
|
|
|
systemctl enable ublue-system-setup.service && \
|
|
|
|
|
systemctl enable ublue-system-flatpak-manager.service && \
|
|
|
|
|
systemctl --global enable ublue-user-flatpak-manager.service && \
|
|
|
|
|
systemctl --global enable ublue-user-setup.service && \
|
2023-03-08 09:57:15 -09:00
|
|
|
fc-cache -f /usr/share/fonts/ubuntu && \
|
2023-06-21 06:04:48 -08:00
|
|
|
fc-cache -f /usr/share/fonts/inter && \
|
2023-09-24 14:54:36 -08:00
|
|
|
find /tmp/just -iname '*.just' -exec printf "\n\n" \; -exec cat {} \; >> /usr/share/ublue-os/just/60-custom.just && \
|
2023-03-08 09:57:15 -09:00
|
|
|
rm -f /etc/yum.repos.d/tailscale.repo && \
|
2023-11-17 04:45:46 -09:00
|
|
|
rm -f /etc/yum.repos.d/charm.repo && \
|
2023-10-12 02:00:55 -08:00
|
|
|
rm -f /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
|
2024-01-04 14:37:11 -09:00
|
|
|
echo "Hidden=true" >> /usr/share/applications/fish.desktop && \
|
|
|
|
|
echo "Hidden=true" >> /usr/share/applications/htop.desktop && \
|
|
|
|
|
echo "Hidden=true" >> /usr/share/applications/nvtop.desktop && \
|
|
|
|
|
echo "Hidden=true" >> /usr/share/applications/gnome-system-monitor.desktop && \
|
2024-01-28 15:04:10 -09:00
|
|
|
rm -f /etc/yum.repos.d/_copr_che-nerd-fonts-"${FEDORA_MAJOR_VERSION}".repo && \
|
2023-03-08 09:57:15 -09:00
|
|
|
sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/user.conf && \
|
|
|
|
|
sed -i 's/#DefaultTimeoutStopSec.*/DefaultTimeoutStopSec=15s/' /etc/systemd/system.conf && \
|
2023-08-07 05:30:37 -08:00
|
|
|
sed -i '/^PRETTY_NAME/s/Silverblue/Bluefin/' /usr/lib/os-release && \
|
2023-03-08 09:57:15 -09:00
|
|
|
rm -rf /tmp/* /var/* && \
|
|
|
|
|
ostree container commit && \
|
2023-03-16 11:54:44 -08:00
|
|
|
mkdir -p /var/tmp && \
|
|
|
|
|
chmod -R 1777 /var/tmp
|
2023-03-08 09:57:15 -09:00
|
|
|
|
2023-05-26 10:53:26 -08:00
|
|
|
## bluefin-dx developer edition image section
|
2023-05-25 18:17:09 -08:00
|
|
|
FROM bluefin AS bluefin-dx
|
|
|
|
|
|
2023-09-23 11:01:43 -08:00
|
|
|
ARG IMAGE_NAME="${IMAGE_NAME}"
|
2023-10-20 09:01:52 -08:00
|
|
|
ARG IMAGE_VENDOR="${IMAGE_VENDOR}"
|
2023-09-23 11:01:43 -08:00
|
|
|
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}"
|
|
|
|
|
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}"
|
2023-05-25 18:17:09 -08:00
|
|
|
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"
|
2023-09-02 08:56:56 -08:00
|
|
|
ARG PACKAGE_LIST="bluefin-dx"
|
2023-05-25 18:17:09 -08:00
|
|
|
|
2023-05-26 10:53:26 -08:00
|
|
|
# dx specific files come from the dx directory in this repo
|
2023-05-28 09:03:00 -08:00
|
|
|
COPY dx/usr /usr
|
2023-08-27 16:12:00 -08:00
|
|
|
COPY dx/etc/yum.repos.d/ /etc/yum.repos.d/
|
2023-09-30 18:03:46 -08:00
|
|
|
COPY workarounds.sh \
|
|
|
|
|
packages.json \
|
|
|
|
|
build.sh \
|
|
|
|
|
image-info.sh \
|
|
|
|
|
/tmp
|
2023-05-25 18:17:09 -08:00
|
|
|
|
2023-09-13 05:50:33 -08:00
|
|
|
# Apply IP Forwarding before installing Docker to prevent messing with LXC networking
|
|
|
|
|
RUN sysctl -p
|
|
|
|
|
|
2023-09-30 18:03:46 -08:00
|
|
|
RUN wget https://copr.fedorainfracloud.org/coprs/ganto/lxc4/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
|
2023-12-09 07:32:13 -09:00
|
|
|
wget https://copr.fedorainfracloud.org/coprs/ublue-os/staging/repo/fedora-"${FEDORA_MAJOR_VERSION}"/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
|
2024-01-29 12:32:50 -09:00
|
|
|
wget https://copr.fedorainfracloud.org/coprs/karmab/kcli/repo/fedora-"${FEDORA_MAJOR_VERSION}"/karmab-kcli-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/karmab-kcli-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
|
|
|
|
|
wget https://copr.fedorainfracloud.org/coprs/atim/ubuntu-fonts/repo/fedora-"${FEDORA_MAJOR_VERSION}"/atim-ubuntu-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/atim-ubuntu-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo
|
2023-05-25 18:17:09 -08:00
|
|
|
|
2023-09-02 08:56:56 -08:00
|
|
|
# Handle packages via packages.json
|
2023-09-30 18:03:46 -08:00
|
|
|
RUN /tmp/build.sh && \
|
|
|
|
|
/tmp/image-info.sh
|
2023-05-25 18:17:09 -08:00
|
|
|
|
2023-07-27 15:14:05 -08:00
|
|
|
RUN wget https://github.com/docker/compose/releases/latest/download/docker-compose-linux-x86_64 -O /tmp/docker-compose && \
|
|
|
|
|
install -c -m 0755 /tmp/docker-compose /usr/bin
|
|
|
|
|
|
2023-12-30 11:30:26 -09:00
|
|
|
COPY --from=cgr.dev/chainguard/dive:latest /usr/bin/dive /usr/bin/dive
|
2023-05-25 18:17:09 -08:00
|
|
|
COPY --from=cgr.dev/chainguard/flux:latest /usr/bin/flux /usr/bin/flux
|
|
|
|
|
COPY --from=cgr.dev/chainguard/helm:latest /usr/bin/helm /usr/bin/helm
|
|
|
|
|
COPY --from=cgr.dev/chainguard/ko:latest /usr/bin/ko /usr/bin/ko
|
|
|
|
|
COPY --from=cgr.dev/chainguard/minio-client:latest /usr/bin/mc /usr/bin/mc
|
2023-07-19 14:40:52 -08:00
|
|
|
COPY --from=cgr.dev/chainguard/kubectl:latest /usr/bin/kubectl /usr/bin/kubectl
|
|
|
|
|
|
2023-09-30 18:03:46 -08:00
|
|
|
RUN curl -Lo ./kind "https://github.com/kubernetes-sigs/kind/releases/latest/download/kind-$(uname)-amd64" && \
|
|
|
|
|
chmod +x ./kind && \
|
|
|
|
|
mv ./kind /usr/bin/kind
|
2023-05-25 18:17:09 -08:00
|
|
|
|
2023-08-08 18:43:03 -08:00
|
|
|
# Install kns/kctx and add completions for Bash
|
|
|
|
|
RUN wget https://raw.githubusercontent.com/ahmetb/kubectx/master/kubectx -O /usr/bin/kubectx && \
|
|
|
|
|
wget https://raw.githubusercontent.com/ahmetb/kubectx/master/kubens -O /usr/bin/kubens && \
|
|
|
|
|
chmod +x /usr/bin/kubectx /usr/bin/kubens
|
|
|
|
|
|
2023-10-01 10:49:26 -08:00
|
|
|
# Set up services
|
2024-01-01 14:25:10 -09:00
|
|
|
RUN systemctl enable docker.socket && \
|
2023-12-20 11:30:53 -09:00
|
|
|
systemctl enable podman.socket && \
|
2024-01-01 09:15:59 -09:00
|
|
|
systemctl enable swtpm-workaround.service && \
|
2024-01-02 11:09:06 -09:00
|
|
|
systemctl enable bluefin-dx-groups.service && \
|
2023-12-31 16:07:28 -09:00
|
|
|
systemctl enable --global bluefin-dx-user-vscode.service && \
|
2023-09-30 18:03:46 -08:00
|
|
|
systemctl disable pmie.service && \
|
|
|
|
|
systemctl disable pmlogger.service
|
2023-07-15 14:14:30 -08:00
|
|
|
|
2023-06-01 11:40:55 -08:00
|
|
|
RUN /tmp/workarounds.sh
|
|
|
|
|
|
2023-05-26 08:32:15 -08:00
|
|
|
# Clean up repos, everything is on the image so we don't need them
|
2023-10-11 11:54:31 -08:00
|
|
|
RUN rm -f /etc/yum.repos.d/ublue-os-staging-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
|
2023-09-30 18:03:46 -08:00
|
|
|
rm -f /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
|
2023-12-09 07:32:13 -09:00
|
|
|
rm -f /etc/yum.repos.d/karmab-kcli-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
|
2024-01-29 12:32:50 -09:00
|
|
|
rm -f /etc/yum.repos.d/atim-ubuntu-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo && \
|
2023-09-30 18:03:46 -08:00
|
|
|
rm -f /etc/yum.repos.d/vscode.repo && \
|
|
|
|
|
rm -f /etc/yum.repos.d/docker-ce.repo && \
|
|
|
|
|
rm -f /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:phracek:PyCharm.repo && \
|
|
|
|
|
rm -f /etc/yum.repos.d/fedora-cisco-openh264.repo && \
|
|
|
|
|
rm -rf /tmp/* /var/* && \
|
|
|
|
|
ostree container commit
|