Skip to content

Commit

Permalink
lint and apply changes to other ubuntu versions
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Morales <[email protected]>
  • Loading branch information
mauromorales committed May 4, 2023
1 parent 5f777bb commit b6f1817
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 18 deletions.
4 changes: 2 additions & 2 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ all:
BUILD +ipxe-iso

all-arm:
BUILD --platform=linux/arm64 +image
BUILD --platform=linux/arm64 +image --MODEL=rpi64
BUILD +image-sbom
BUILD +trivy-scan
BUILD +grype-scan
BUILD --platform=linux/arm64 +arm-image

all-arm-generic:
BUILD --platform=linux/arm64 +image --MODEL=generic
BUILD --platform=linux/arm64 +iso
BUILD --platform=linux/arm64 +iso --MODEL=generic

go-deps-test:
ARG GO_VERSION
Expand Down
27 changes: 21 additions & 6 deletions images/Dockerfile.ubuntu-20-lts-arm-rpi
Original file line number Diff line number Diff line change
@@ -1,15 +1,29 @@
ARG BASE_IMAGE=ubuntu:20.04
ARG MODEL=generic

FROM $BASE_IMAGE

ENV DEBIAN_FRONTEND=noninteractive

RUN echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal main universe restricted multiverse" >> /etc/apt/sources.list.d/raspberrypi.list
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:oibaf/test \
&& apt-get update \
&& apt-get install -y \
&& rm -rf /var/lib/apt/lists/* \

FROM base AS generic
RUN apt-get update && apt-get install -y linux-base \
linux-image-generic-hwe-22.04 \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \

FROM base AS rpi64
RUN apt-get update && apt-get install -y linux-firmware-raspi \
linux-modules-extra-raspi \
linux-raspi \
&& apt-get clean && rm -rf /var/lib/apt/lists/* \

FROM ${MODEL} AS all

FROM all
#RUN echo "deb http://ports.ubuntu.com/ubuntu-ports/ focal main universe restricted multiverse" >> /etc/apt/sources.list.d/raspberrypi.list
RUN apt-get update && apt-get install -y \
conntrack \
console-data \
coreutils \
Expand All @@ -20,6 +34,7 @@ RUN apt-get update \
dracut-network \
e2fsprogs \
gawk \
gdisk \
grub-efi-arm64-bin \
grub2-common \
haveged \
Expand All @@ -44,7 +59,7 @@ RUN apt-get update \
systemd \
systemd-timesyncd \
tar \
&& rm -rf /var/lib/apt/lists/*
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install
RUN ln -s /usr/bin/grub-editenv /usr/bin/grub2-editenv
Expand Down
26 changes: 21 additions & 5 deletions images/Dockerfile.ubuntu-22-lts-arm-rpi
Original file line number Diff line number Diff line change
@@ -1,15 +1,30 @@
ARG BASE_IMAGE=ubuntu:22.04
ARG MODEL=generic

FROM $BASE_IMAGE

ENV DEBIAN_FRONTEND=noninteractive

RUN echo "deb http://ports.ubuntu.com/ubuntu-ports/ jammy main universe restricted multiverse" >> /etc/apt/sources.list.d/raspberrypi.list
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:oibaf/test \
&& apt-get update \
&& apt-get install -y \
&& rm -rf /var/lib/apt/lists/* \

FROM base AS generic
RUN apt-get update && apt-get install -y linux-base \
linux-image-generic-hwe-22.04 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM base AS rpi64
RUN apt-get update && apt-get install -y linux-firmware-raspi \
linux-modules-extra-raspi \
linux-raspi \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM ${MODEL} AS all

# RUN echo "deb http://ports.ubuntu.com/ubuntu-ports/ jammy main universe restricted multiverse" >> /etc/apt/sources.list.d/raspberrypi.list
FROM all
RUN apt-get update && apt-get install -y \
conntrack \
console-data \
coreutils \
Expand All @@ -21,6 +36,7 @@ RUN apt-get update \
dracut-live \
e2fsprogs \
gawk \
gdisk \
grub-efi-arm64-bin \
grub2-common \
haveged \
Expand All @@ -46,7 +62,7 @@ RUN apt-get update \
systemd \
systemd-timesyncd \
tar \
&& rm -rf /var/lib/apt/lists/*
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install
RUN ln -s /usr/bin/grub-editenv /usr/bin/grub2-editenv
Expand Down
12 changes: 7 additions & 5 deletions images/Dockerfile.ubuntu-arm-rpi
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,19 @@ FROM $BASE_IMAGE as base
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y software-properties-common \
&& add-apt-repository ppa:oibaf/test
&& add-apt-repository ppa:oibaf/test \
&& rm -rf /var/lib/apt/lists/*

FROM base AS generic
RUN apt-get update && apt-get install -y linux-base \
linux-image-generic-hwe-22.04
linux-image-generic-hwe-22.04 \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM base AS rpi64
# RUN echo "deb http://ports.ubuntu.com/ubuntu-ports/ kinetic main universe restricted multiverse" >> /etc/apt/sources.list.d/ports.list
RUN apt-get update && apt-get install -y linux-firmware-raspi \
linux-modules-extra-raspi \
linux-raspi
linux-raspi \
&& apt-get clean && rm -rf /var/lib/apt/lists/*

FROM ${MODEL} AS all

Expand Down Expand Up @@ -52,7 +54,7 @@ RUN apt-get update && apt-get install -y \
systemd \
systemd-timesyncd \
tar \
&& rm -rf /var/lib/apt/lists/*
&& apt-get clean && rm -rf /var/lib/apt/lists/*

RUN ln -s /usr/sbin/grub-install /usr/sbin/grub2-install
RUN ln -s /usr/bin/grub-editenv /usr/bin/grub2-editenv
Expand Down

0 comments on commit b6f1817

Please sign in to comment.