Skip to content

Commit

Permalink
Fix issues building arm
Browse files Browse the repository at this point in the history
Signed-off-by: Mauro Morales <mauro.morales@spectrocloud.com>
  • Loading branch information
mauromorales committed Dec 21, 2023
1 parent 6dfdbca commit 5c699ba
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 4 deletions.
15 changes: 12 additions & 3 deletions Earthfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
VERSION 0.6
FROM alpine
FROM alpine:3.18
ARG REGISTRY_AND_ORG=quay.io/kairos
ARG IMAGE
ARG SUPPORT=official # not using until this is defined in https://github.com/kairos-io/kairos/issues/1527
Expand Down Expand Up @@ -283,6 +283,7 @@ base-image:
COPY +git-version/GIT_VERSION VERSION

SAVE IMAGE $_CIMG
SAVE ARTIFACT /etc/os-release osrelease
SAVE ARTIFACT /IMAGE AS LOCAL build/IMAGE
SAVE ARTIFACT VERSION AS LOCAL build/VERSION
SAVE ARTIFACT /etc/kairos/versions.yaml versions.yaml AS LOCAL build/versions.yaml
Expand Down Expand Up @@ -526,15 +527,23 @@ netboot:
SAVE ARTIFACT /build/$ISO_NAME-initrd initrd AS LOCAL build/$ISO_NAME-initrd
SAVE ARTIFACT /build/$ISO_NAME.ipxe ipxe AS LOCAL build/$ISO_NAME.ipxe

foo:
FROM alpine
COPY +base-image/osrelease osrelease
RUN source osrelease && echo $KAIROS_ARTIFACT > foo
SAVE ARTIFACT foo foo AS LOCAL build/foo

arm-image:
ARG OSBUILDER_IMAGE
ARG COMPRESS_IMG=true
ARG IMG_COMPRESSION=xz

FROM +base-image
ARG IMAGE_NAME=$(source /etc/os-release; echo '$KAIROS_ARTIFACT').img
COPY --platform=linux/arm64 +base-image/osrelease osrelease
ARG IMAGE_NAME=$(source osrelease && echo $KAIROS_ARTIFACT).img
RUN rm osrelease

FROM $OSBUILDER_IMAGE
ARG --required MODEL

WORKDIR /build
# These sizes are in MB
Expand Down
1 change: 1 addition & 0 deletions images/Dockerfile.kairos-opensuse
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ RUN zypper in --force-resolution -y \
tmux \
vim \
which \
tpm2* \
&& zypper cc

FROM common as amd64
Expand Down
2 changes: 1 addition & 1 deletion images/Dockerfile.kairos-rhel
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ FROM epel AS almalinux
FROM epel AS rockylinux

FROM base AS fedora
RUN dnf install -y "https://zfsonlinux.org/fedora/zfs-release-2-3$(rpm --eval "%{dist}").noarch.rpm" && dnf clean all
RUN dnf install -y "https://zfsonlinux.org/fedora/zfs-release-2-4$(rpm --eval "%{dist}").noarch.rpm" && dnf clean all

# install common packages
FROM ${FLAVOR} AS common
Expand Down
1 change: 1 addition & 0 deletions images/Dockerfile.kairos-ubuntu
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ RUN apt-get update \
ubuntu-advantage-tools \
xz-utils \
zstd \
tpm2-* \
&& apt-get remove -y unattended-upgrades && apt-get clean && rm -rf /var/lib/apt/lists/*

###############################################################
Expand Down

0 comments on commit 5c699ba

Please sign in to comment.