diff --git a/Dockerfile b/Dockerfile index dfee46f3..fe790752 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,6 +1,12 @@ # ----- EIB Builder Image ----- FROM registry.suse.com/bci/golang:1.22 +ENV HAULER_VERSION=1.0.7 +ENV PLATFORM=linux +ENV ARCH=amd64 +ENV CGO_ENABLED=1 +ENV GO111MODULE=on + # Dependency uses by line # 1. Podman Go library RUN zypper install -y \ @@ -8,6 +14,8 @@ RUN zypper install -y \ WORKDIR /src +RUN curl -sfL "https://github.com/hauler-dev/hauler/releases/download/v${HAULER_VERSION}/hauler_${HAULER_VERSION}_${PLATFORM}_${ARCH}.tar.gz" | tar -xzf - + COPY go.mod go.sum ./ COPY ./cmd ./cmd COPY ./pkg ./pkg @@ -17,8 +25,9 @@ RUN --mount=type=cache,id=gomod,target=/go/pkg/mod \ --mount=type=cache,id=gobuild,target=/root/.cache/go-build \ go build ./cmd/eib +# CGO_ENABLED=0 # ----- Deliverable Image ----- -FROM opensuse/leap:15.5 +FROM opensuse/leap:15.6 # Dependency uses by line # 1. ISO image building @@ -31,7 +40,7 @@ RUN zypper addrepo https://download.opensuse.org/repositories/isv:SUSE:Edge:Edge zypper --gpg-auto-import-keys refresh && \ zypper install -y \ xorriso squashfs \ - libguestfs kernel-default e2fsprogs parted gptfdisk btrfsprogs guestfs-tools lvm2 \ + libguestfs kernel-default e2fsprogs parted gptfdisk btrfsprogs guestfs-tools lvm2\ podman \ createrepo_c \ helm hauler \ @@ -39,5 +48,6 @@ RUN zypper addrepo https://download.opensuse.org/repositories/isv:SUSE:Edge:Edge zypper clean -a COPY --from=0 /src/eib /bin/eib +COPY --from=0 /src/hauler /opt/hauler/hauler ENTRYPOINT ["/bin/eib"]