Skip to content

Commit 87546b3

Browse files
committed
ci: use golang bci instead of manual download
Signed-off-by: davidko <[email protected]> (cherry picked from commit d1662b2) # Conflicts: # Dockerfile.dapper
1 parent 83d8e14 commit 87546b3

File tree

1 file changed

+16
-19
lines changed

1 file changed

+16
-19
lines changed

Dockerfile.dapper

+16-19
Original file line numberDiff line numberDiff line change
@@ -1,47 +1,44 @@
1+
<<<<<<< HEAD
12
FROM registry.suse.com/bci/bci-base:15.5
3+
=======
4+
FROM registry.suse.com/bci/golang:1.22
5+
>>>>>>> d1662b2 (ci: use golang bci instead of manual download)
26

3-
ARG DAPPER_HOST_ARCH=amd64
7+
ARG DAPPER_HOST_ARCH
48
ARG http_proxy
59
ARG https_proxy
6-
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
710

8-
# Setup environment
11+
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
912
ENV PATH /go/bin:$PATH
1013
ENV DAPPER_DOCKER_SOCKET true
1114
ENV DAPPER_ENV TAG REPO DRONE_REPO DRONE_PULL_REQUEST DRONE_COMMIT_REF
1215
ENV DAPPER_OUTPUT bin coverage.out
1316
ENV DAPPER_SOURCE /go/src/github.com/longhorn/backing-image-manager
14-
WORKDIR ${DAPPER_SOURCE}
1517

18+
WORKDIR ${DAPPER_SOURCE}
19+
ENTRYPOINT ["./scripts/entry"]
20+
CMD ["ci"]
1621

1722
RUN zypper -n addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/SLE_15/system:snappy.repo && \
18-
zypper --gpg-auto-import-keys ref
23+
zypper --gpg-auto-import-keys ref && \
24+
zypper -n ref && \
25+
zypper update -y
1926

2027
# Install packages
2128
RUN zypper -n install cmake wget curl git less file \
2229
libkmod-devel libnl3-devel linux-glibc-devel pkg-config psmisc python3-tox fuse python3-devel qemu-tools \
2330
bash-completion librdmacm1 librdmacm-utils libibverbs xsltproc docbook-xsl-stylesheets \
2431
perl-Config-General libaio-devel glibc-devel-static glibc-devel iptables libltdl7 libdevmapper1_03 iproute2 jq docker gcc
2532

26-
# needed for ${!var} substitution
33+
# FIXME: Needed for ${!var} substitution
2734
RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh
2835

29-
RUN if [ ${ARCH} == "s390x" ]; then \
30-
ln -s /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc;\
31-
fi
36+
# Install tools
3237

33-
# Install Go & tools
34-
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm64=arm64 GOLANG_ARCH_s390x=s390x GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
35-
GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
36-
RUN wget -O - https://storage.googleapis.com/golang/go1.21.3.linux-${!GOLANG_ARCH}.tar.gz | tar -xzf - -C /usr/local
38+
## golangci-lint
3739
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
3840

39-
# The docker version in dapper is too old to have buildx. Install it manually.
41+
## Docker Buildx: The docker version in dapper is too old to have buildx. Install it manually.
4042
RUN wget https://github.com/docker/buildx/releases/download/v0.13.1/buildx-v0.13.1.linux-${ARCH} && \
4143
chmod +x buildx-v0.13.1.linux-${ARCH} && \
4244
mv buildx-v0.13.1.linux-${ARCH} /usr/local/bin/buildx
43-
44-
VOLUME /tmp
45-
ENV TMPDIR /tmp
46-
ENTRYPOINT ["./scripts/entry"]
47-
CMD ["ci"]

0 commit comments

Comments
 (0)