Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add DX Images #565

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
fail-fast: false
matrix:
image_flavor: [main, nvidia, asus, asus-nvidia, framework, surface, surface-nvidia]
base_name: [bazzite, bazzite-deck]
base_name: [bazzite, bazzite-deck, bazzite-dx]
base_image_name: [kinoite, silverblue]
major_version: [39]
include:
Expand Down
40 changes: 40 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -495,3 +495,43 @@ RUN /tmp/image-info.sh && \
mkdir -p /var/lib/bluetooth && \
chmod -R 755 /var/lib/bluetooth && \
ostree container commit

FROM bazzite as bazzite-dx

ARG IMAGE_NAME="${IMAGE_NAME}"
ARG IMAGE_VENDOR="${IMAGE_VENDOR}"
ARG IMAGE_FLAVOR="${IMAGE_FLAVOR}"
ARG BASE_IMAGE_NAME="${BASE_IMAGE_NAME}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION}"

COPY system_files/deck/shared system_files/deck/${BASE_IMAGE_NAME} /
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of copying Deck files, we could move from this being an image target to an option so that DX desktop and DX Deck images can exist separately by adding another build flag that distinguishes itself between standard images and DX images


# Apply IP Forwarding before installing Docker to prevent messing with LXC networking
RUN sysctl -p && \
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

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

# Install DevPod
RUN rpm-ostree install https://github.com/loft-sh/devpod/releases/download/v0.3.7/DevPod_linux_x86_64.rpm && \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe I read that this is going to be provided as an AppImage only going into the future with only the CLI being provided as an RPM. We could install the CLI, and then have a dx entry in the portal that provides downloading the AppImage as an option if that sounds all right to you?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The plan was to COPR this one with the intent of seeing if someone can help us get it in fedora.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't mind looking into throwing it on COPR. I think that's the best bet as it would be nice for it to just be there out of the box

wget https://github.com/loft-sh/devpod/releases/download/v0.3.7/devpod-linux-amd64 -O /tmp/devpod && \
install -c -m 0755 /tmp/devpod /usr/bin

# Cleanup & Finalize
COPY system_files/shared /
RUN /tmp/image-info.sh && \
systemctl enable podman.socket && \
systemctl disable pmie.service && \
systemctl disable pmlogger.service && \
rm -rf \
/tmp/* \
/var/* && \
mkdir -p /var/tmp && \
chmod -R 1777 /var/tmp && \
mkdir -p /var/lib/bluetooth && \
chmod -R 755 /var/lib/bluetooth && \
ostree container commit
6 changes: 6 additions & 0 deletions system_files/dx/etc/yum.repos.d/docker-ce.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[docker-ce-stable]
name=Docker CE Stable - $basearch
baseurl=https://download.docker.com/linux/fedora/$releasever/$basearch/stable
enabled=1
gpgcheck=1
gpgkey=https://download.docker.com/linux/fedora/gpg
6 changes: 6 additions & 0 deletions system_files/dx/etc/yum.repos.d/vscode.repo
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[code]
name=Visual Studio Code
baseurl=https://packages.microsoft.com/yumrepos/vscode
enabled=1
gpgcheck=1
gpgkey=https://packages.microsoft.com/keys/microsoft.asc
7 changes: 7 additions & 0 deletions system_files/dx/usr/etc/profile.d/vscode-bazzite-profile.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
if test "$(id -u)" -gt "0" && test -d "$HOME"; then

Check failure on line 1 in system_files/dx/usr/etc/profile.d/vscode-bazzite-profile.sh

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

system_files/dx/usr/etc/profile.d/vscode-bazzite-profile.sh#L1

Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Codacy found a critical Error Prone issue: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.

The issue that ShellCheck is pointing out is that it does not know which shell interpreter you are targeting with your script. ShellCheck needs this information because different shells may have different syntax or support different features. A shebang line at the beginning of your script tells the operating system which interpreter to use when the script is executed, and it also informs ShellCheck which shell to assume when linting the code.

To fix this issue, you should add a shebang line to the top of your script to specify the shell you are using. If you are using Bash, which is common and seems to be the case based on your code, you would add the following line at the very beginning of your script:

Suggested change
if test "$(id -u)" -gt "0" && test -d "$HOME"; then
#!/bin/bash

This comment was generated by an experimental AI tool.

# Add default settings when there are no settings
if test ! -e "$HOME"/.config/Code/User/settings.json; then
mkdir -p "$HOME"/.config/Code/User
cp -f /etc/skel.d/.config/Code/User/settings.json "$HOME"/.config/Code/User/settings.json
fi
fi
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"dev.containers.dockerComposePath": "podman-compose",
"dev.containers.dockerPath": "podman",
"window.titleBarStyle": "custom",
"editor.fontFamily": "'CaskaydiaCove Nerd Font Mono', 'Droid Sans Mono', 'monospace', monospace"
}
1 change: 1 addition & 0 deletions system_files/dx/usr/lib/sysctl.d/docker-ce.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
net.ipv4.ip_forward = 1
Loading