Skip to content

Commit

Permalink
🐧 Change ubuntu images location (#204)
Browse files Browse the repository at this point in the history
* 🐧 Move 20 LTS to ubuntu-20-lts repository, ubuntu-rolling to ubuntu

See: #150 (comment)

* 🐧 Add ubuntu 22 lts

Fixes: #150
  • Loading branch information
mudler committed Oct 10, 2022
1 parent f6bb4c5 commit 8bebc8c
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 10 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ jobs:
include:
- flavor: "opensuse"
- flavor: "ubuntu"
- flavor: "ubuntu-rolling"
- flavor: "ubuntu-20-lts"
- flavor: "ubuntu-22-lts"
- flavor: "alpine"
- flavor: "fedora"
- flavor: "rockylinux"
Expand Down Expand Up @@ -158,7 +159,8 @@ jobs:
- flavor: "alpine"
- flavor: "opensuse"
- flavor: "ubuntu"
- flavor: "ubuntu-rolling"
- flavor: "ubuntu-20-lts"
- flavor: "ubuntu-22-lts"
steps:
- uses: actions/checkout@v2
- name: Download artifacts
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,8 @@ jobs:
include:
- flavor: "opensuse"
- flavor: "alpine"
- flavor: "ubuntu-rolling"
- flavor: "ubuntu-20-lts"
- flavor: "ubuntu-22-lts"
- flavor: "ubuntu"
- flavor: "fedora"
# - flavor: "fedora"
Expand Down
6 changes: 3 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ framework:

ENV USER=root

IF [ "$FLAVOR" == "ubuntu-rolling" ]
IF [ "$FLAVOR" == "ubuntu-20-lts" ] || [ "$FLAVOR" == "ubuntu-22-lts" ]
ARG TOOLKIT_IMG="ubuntu"
ELSE IF [ "$FLAVOR" == "rockylinux" ]
ARG TOOLKIT_IMG="fedora"
Expand Down Expand Up @@ -245,7 +245,7 @@ docker:
COPY overlay/files-opensuse-arm-rpi/ /
ELSE IF [ "$FLAVOR" = "fedora" ] || [ "$FLAVOR" = "rockylinux" ]
COPY overlay/files-fedora/ /
ELSE IF [ "$FLAVOR" = "ubuntu" ] || [ "$FLAVOR" = "ubuntu-rolling" ]
ELSE IF [ "$FLAVOR" = "ubuntu" ] || [ "$FLAVOR" = "ubuntu-20-lts" ] || [ "$FLAVOR" = "ubuntu-22-lts" ]
COPY overlay/files-ubuntu/ /
END

Expand All @@ -264,7 +264,7 @@ docker:
RUN kernel=$(ls /lib/modules | head -n1) && depmod -a "${kernel}"
# https://github.com/kairos-io/elemental-cli/blob/23ca64435fedb9f521c95e798d2c98d2714c53bd/pkg/elemental/elemental.go#L553
RUN rm -rf /boot/initramfs-*
ELSE IF [ "$FLAVOR" = "ubuntu" ] || [ "$FLAVOR" = "ubuntu-rolling" ]
ELSE IF [ "$FLAVOR" = "ubuntu" ] || [ "$FLAVOR" = "ubuntu-20-lts" ] || [ "$FLAVOR" = "ubuntu-22-lts" ]
RUN kernel=$(ls /boot/vmlinuz-* | head -n1) && \
ln -sf "${kernel#/boot/}" /boot/vmlinuz
RUN kernel=$(ls /lib/modules | head -n1) && \
Expand Down
6 changes: 3 additions & 3 deletions images/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=ubuntu:20.04
ARG BASE_IMAGE=ubuntu:22.10

FROM $BASE_IMAGE
ARG K3S_VERSION
Expand All @@ -20,7 +20,7 @@ RUN apt install -y \
iproute2 \
squashfs-tools \
parted dracut \
dracut-network tar \
dracut-network dracut-live tar \
e2fsprogs \
dosfstools \
coreutils \
Expand All @@ -34,7 +34,7 @@ RUN apt install -y \
jq \
neovim \
open-vm-tools \
linux-image-generic-hwe-20.04 && apt-get clean
linux-image-generic-hwe-22.04 && apt-get clean

RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install
RUN ln -s /usr/bin/grub-editenv /usr/bin/grub2-editenv
Expand Down
56 changes: 56 additions & 0 deletions images/Dockerfile.ubuntu-20-lts
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
ARG BASE_IMAGE=ubuntu:20.04

FROM $BASE_IMAGE
ARG K3S_VERSION

ENV DEBIAN_FRONTEND=noninteractive

RUN apt update
RUN apt install -y software-properties-common
RUN add-apt-repository ppa:oibaf/test
RUN apt update
RUN apt install -y \
systemd \
grub-pc-bin \
grub-efi-amd64-bin \
grub2 \
grub2-common \
nohang \
sudo \
iproute2 \
squashfs-tools \
parted dracut \
dracut-network tar \
e2fsprogs \
dosfstools \
coreutils \
debianutils \
curl \
openssh-server \
nano \
gawk \
haveged \
rsync \
jq \
neovim \
open-vm-tools \
linux-image-generic-hwe-20.04 && apt-get clean

RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install
RUN ln -s /usr/bin/grub-editenv /usr/bin/grub2-editenv
RUN systemctl enable nohang-desktop.service
RUN systemctl enable systemd-networkd
RUN systemctl enable ssh
RUN echo "auto lo" > /etc/network/interfaces
RUN echo "iface lo inet loopback" >> /etc/network/interfaces

# Enable tmp
RUN cp -v /usr/share/systemd/tmp.mount /etc/systemd/system/
RUN systemctl enable tmp.mount

# Fixup sudo perms
RUN chown root:root /usr/bin/sudo && chmod 4755 /usr/bin/sudo


# Clear cache
RUN apt-get clean && rm -rf /var/cache/* && journalctl --vacuum-size=1K && rm /etc/machine-id && rm /var/lib/dbus/machine-id
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG BASE_IMAGE=ubuntu:22.10
ARG BASE_IMAGE=ubuntu:22.04

FROM $BASE_IMAGE
ARG K3S_VERSION
Expand Down

0 comments on commit 8bebc8c

Please sign in to comment.