Skip to content
This repository has been archived by the owner on Feb 19, 2024. It is now read-only.

Commit

Permalink
feat: install docker on bluefin-dx image (ublue-os#485)
Browse files Browse the repository at this point in the history
  • Loading branch information
p5 authored Sep 13, 2023
1 parent d9909d2 commit cedcfee
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ 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}"
ARG FEDORA_MAJOR_VERSION="${FEDORA_MAJOR_VERSION:-38}"
ARG TARGET_BASE="${TARGET_BASE:-bluefin}"

## bluefin image section
Expand Down Expand Up @@ -59,6 +59,9 @@ COPY workarounds.sh /tmp/workarounds.sh
COPY packages.json /tmp/packages.json
COPY build.sh /tmp/build.sh

# Apply IP Forwarding before installing Docker to prevent messing with LXC networking
RUN sysctl -p

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
RUN wget https://copr.fedorainfracloud.org/coprs/bobslept/nerd-fonts/repo/fedora-"${FEDORA_MAJOR_VERSION}"/bobslept-nerd-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo -O /etc/yum.repos.d/bobslept-nerd-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo

Expand Down Expand Up @@ -100,6 +103,7 @@ RUN /tmp/workarounds.sh
RUN rm -f /etc/yum.repos.d/bobslept-nerd-fonts-fedora-"${FEDORA_MAJOR_VERSION}".repo
RUN rm -f /etc/yum.repos.d/ganto-lxc4-fedora-"${FEDORA_MAJOR_VERSION}".repo
RUN rm -f /etc/yum.repos.d/vscode.repo
RUN rm -f /etc/yum.repos.d/docker-ce.repo
RUN rm -f /etc/yum.repos.d/_copr:copr.fedorainfracloud.org:phracek:PyCharm.repo
RUN rm -f /etc/yum.repos.d/fedora-cisco-openh264.repo

Expand Down
6 changes: 6 additions & 0 deletions 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
1 change: 1 addition & 0 deletions 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
5 changes: 5 additions & 0 deletions packages.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@
"cockpit-storaged",
"cockpit-system",
"code",
"containerd.io",
"dbus-x11",
"docker-ce",
"docker-ce-cli",
"docker-buildx-plugin",
"docker-compose-plugin",
"edk2-ovmf",
"edk2-ovmf",
"genisoimage",
Expand Down
4 changes: 4 additions & 0 deletions usr/share/ublue-os/just/custom.just
Original file line number Diff line number Diff line change
Expand Up @@ -194,3 +194,7 @@ yafti:
# Switch to the zsh shell
zsh:
sudo lchsh $USER /usr/bin/zsh

docker:
sudo systemctl enable --now docker
sudo usermod -aG docker $USER

0 comments on commit cedcfee

Please sign in to comment.