-
Notifications
You must be signed in to change notification settings - Fork 104
Expand file tree
/
Copy pathDockerfile.dapper
More file actions
68 lines (54 loc) · 3.06 KB
/
Dockerfile.dapper
File metadata and controls
68 lines (54 loc) · 3.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
FROM registry.suse.com/bci/golang:1.25
ARG http_proxy=$http_proxy
ARG https_proxy=$https_proxy
ARG no_proxy=$no_proxy
ENV http_proxy=$http_proxy
ENV https_proxy=$https_proxy
ENV no_proxy=$no_proxy
ARG HARVESTER_INSTALLER_OFFLINE_BUILD
ENV HARVESTER_INSTALLER_OFFLINE_BUILD=$HARVESTER_INSTALLER_OFFLINE_BUILD
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
# mtools and dosfstools are requirements for luet-makeiso >= 0.4.0 to build hybrid ISO.
RUN zypper -n rm container-suseconnect && \
zypper -n install git curl docker gzip tar wget zstd squashfs xorriso awk jq mtools dosfstools unzip rsync patch
# yq
# renovate: datasource=github-release-attachments depName=mikefarah/yq
ARG YQ_VERSION=v4.52.5
# renovate: datasource=github-release-attachments depName=mikefarah/yq digestVersion=v4.52.5
ARG YQ_SUM_amd64=75d893a0d5940d1019cb7cdc60001d9e876623852c31cfc6267047bc31149fa9
# renovate: datasource=github-release-attachments depName=mikefarah/yq digestVersion=v4.52.5
ARG YQ_SUM_arm64=90fa510c50ee8ca75544dbfffed10c88ed59b36834df35916520cddc623d9aaa
ENV YQ_SUM="YQ_SUM_${ARCH}"
RUN curl -sfL https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_${ARCH} -o /usr/bin/yq && echo "${!YQ_SUM}" /usr/bin/yq | sha256sum -c - && chmod +x /usr/bin/yq
RUN go install github.com/golangci/golangci-lint/v2/cmd/golangci-lint@v2.11.4
# only needed for raw image generation. currently skipped for arm builds
RUN if [ "${ARCH}" == "amd64" ]; then \
zypper addrepo http://download.opensuse.org/distribution/leap/15.4/repo/oss/ oss && \
zypper --gpg-auto-import-keys refresh && \
zypper in -y qemu-x86 qemu-tools; \
fi
# set up helm
ARG HELM_VERSION=v3.20.0
ARG HELM_SUM_amd64=dbb4c8fc8e19d159d1a63dda8db655f9ffa4aac1b9a6b188b34a40957119b286
ARG HELM_SUM_arm64=bfb14953295d5324d47ab55f3dfba6da28d46c848978c8fbf412d4271bdc29f1
ARG HELM_SUM="HELM_SUM_${ARCH}"
RUN mkdir /usr/tmp && cd /usr/tmp && \
curl -O https://get.helm.sh/helm-${HELM_VERSION}-linux-${ARCH}.tar.gz && \
echo "${!HELM_SUM}" helm-${HELM_VERSION}-linux-${ARCH}.tar.gz | sha256sum -c - && \
tar xvzf helm-${HELM_VERSION}-linux-${ARCH}.tar.gz --strip-components=1 && \
mv helm /usr/bin/helm
ARG LOCAL_HARVESTER_SRC
ENV HARVESTER_SRC_MOUNT="${LOCAL_HARVESTER_SRC:+-v $LOCAL_HARVESTER_SRC:/go/src/github.com/harvester/harvester}"
ARG LOCAL_ADDONS_SRC
ENV ADDONS_SRC_MOUNT="${LOCAL_ADDONS_SRC:+-v $LOCAL_ADDONS_SRC:/go/src/github.com/harvester/addons}"
# You cloud defined your own rke2 url by setup `RKE2_IMAGE_REPO`
ENV DAPPER_ENV REPO TAG DRONE_TAG DRONE_BRANCH CROSS RKE2_IMAGE_REPO USE_LOCAL_IMAGES BUILD_QCOW DRONE_BUILD_EVENT REMOTE_DEBUG DISABLE_BUILD_NET_INSTALL_ISO
ENV DAPPER_SOURCE /go/src/github.com/harvester/harvester-installer/
ENV DAPPER_OUTPUT ./bin ./dist
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_RUN_ARGS "-v /run/containerd/containerd.sock:/run/containerd/containerd.sock -v harvester-installer-go:/root/go -v harvester-installer-cache:/root/.cache ${HARVESTER_SRC_MOUNT} ${ADDONS_SRC_MOUNT} --privileged"
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]