Skip to content

Commit

Permalink
Use the BCI base image during Windows image build
Browse files Browse the repository at this point in the history
to avoid docker rate limit on the alpine linux image

Signed-off-by: Michael Fritch <[email protected]>
  • Loading branch information
mgfritch committed Jul 16, 2024
1 parent 7918b9a commit 10a7691
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 24 deletions.
41 changes: 21 additions & 20 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,26 @@ ARG KUBERNETES_VERSION=dev
FROM rancher/hardened-build-base:v1.22.4b1 AS build
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
RUN set -x && \
apk --no-cache add \
bash \
curl \
file \
git \
libseccomp-dev \
rsync \
gcc \
bsd-compat-headers \
py-pip \
py3-pip \
pigz \
tar \
yq \
helm
RUN zypper refresh && \
zypper update -y && \
zypper install -y
bash \
curl \
file \
git \
libseccomp-dev \
rsync \
gcc \
bsd-compat-headers \
py-pip \
py3-pip \
pigz \
tar \
yq \
helm

RUN if [ "${ARCH}" = "amd64" ]; then \
apk --no-cache add mingw-w64-gcc; \
zypper install -y mingw-w64-gcc; \
fi

FROM registry.suse.com/bci/bci-base AS rpm-macros
Expand Down Expand Up @@ -51,13 +52,13 @@ RUN curl -sL https://dl.k8s.io/release/$( \
RUN python3 -m pip install awscli
RUN curl -sL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2
RUN set -x && \
apk --no-cache add \
zypper install -y \
libarchive-tools \
zstd \
jq \
python3 && \
if [ "${ARCH}" != "s390x" ] || [ "${GOARCH}" != "arm64" ]; then \
apk add --no-cache rpm-dev; \
zypper install -y rpm-dev; \
fi

RUN GOCR_VERSION="v0.5.1" && \
Expand All @@ -81,7 +82,7 @@ COPY --from=rpm-macros /usr/lib/rpm/macros.d/macros.systemd /usr/lib/rpm/macros.
# Shell used for debugging
FROM dapper AS shell
RUN set -x && \
apk --no-cache add \
zypper install -y \
bash-completion \
iptables \
less \
Expand Down
8 changes: 4 additions & 4 deletions Dockerfile.windows
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM alpine:3.20 AS build
FROM registry.suse.com/bci/bci-base AS build

RUN apk --no-cache add \
RUN zypper install -y \
curl \
unzip

Expand All @@ -13,9 +13,9 @@ ENV DAPPER_OUTPUT ./dist ./bin ./build
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_TARGET dapper
ENV DAPPER_RUN_ARGS "--privileged --network host -v /tmp:/tmp -v rke2-pkg:/go/pkg -v rke2-cache:/root/.cache/go-build"
RUN apk update
RUN zypper refresh && zypper update
RUN set -x && \
apk add --no-cache \
zypper install -y \
mingw-w64-gcc \
libarchive-tools \
gcc \
Expand Down

0 comments on commit 10a7691

Please sign in to comment.