Skip to content

Commit

Permalink
chore: Dockerfile chagned for new hauler and opensuse/leap base image
Browse files Browse the repository at this point in the history
  • Loading branch information
erpz22 committed Aug 20, 2024
1 parent 6e7ff40 commit 6551ba1
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
# ----- 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 \
gpgme-devel device-mapper-devel libbtrfs-devel

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
Expand All @@ -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
Expand All @@ -31,13 +40,14 @@ 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 \
nm-configurator && \
zypper clean -a

COPY --from=0 /src/eib /bin/eib
COPY --from=0 /src/hauler /opt/hauler/hauler

ENTRYPOINT ["/bin/eib"]

0 comments on commit 6551ba1

Please sign in to comment.