|
| 1 | +<<<<<<< HEAD |
1 | 2 | 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) |
2 | 6 |
|
3 |
| -ARG DAPPER_HOST_ARCH=amd64 |
| 7 | +ARG DAPPER_HOST_ARCH |
4 | 8 | ARG http_proxy
|
5 | 9 | ARG https_proxy
|
6 |
| -ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} |
7 | 10 |
|
8 |
| -# Setup environment |
| 11 | +ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH} |
9 | 12 | ENV PATH /go/bin:$PATH
|
10 | 13 | ENV DAPPER_DOCKER_SOCKET true
|
11 | 14 | ENV DAPPER_ENV TAG REPO DRONE_REPO DRONE_PULL_REQUEST DRONE_COMMIT_REF
|
12 | 15 | ENV DAPPER_OUTPUT bin coverage.out
|
13 | 16 | ENV DAPPER_SOURCE /go/src/github.com/longhorn/backing-image-manager
|
14 |
| -WORKDIR ${DAPPER_SOURCE} |
15 | 17 |
|
| 18 | +WORKDIR ${DAPPER_SOURCE} |
| 19 | +ENTRYPOINT ["./scripts/entry"] |
| 20 | +CMD ["ci"] |
16 | 21 |
|
17 | 22 | 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 |
19 | 26 |
|
20 | 27 | # Install packages
|
21 | 28 | RUN zypper -n install cmake wget curl git less file \
|
22 | 29 | libkmod-devel libnl3-devel linux-glibc-devel pkg-config psmisc python3-tox fuse python3-devel qemu-tools \
|
23 | 30 | bash-completion librdmacm1 librdmacm-utils libibverbs xsltproc docbook-xsl-stylesheets \
|
24 | 31 | perl-Config-General libaio-devel glibc-devel-static glibc-devel iptables libltdl7 libdevmapper1_03 iproute2 jq docker gcc
|
25 | 32 |
|
26 |
| -# needed for ${!var} substitution |
| 33 | +# FIXME: Needed for ${!var} substitution |
27 | 34 | RUN rm -f /bin/sh && ln -s /bin/bash /bin/sh
|
28 | 35 |
|
29 |
| -RUN if [ ${ARCH} == "s390x" ]; then \ |
30 |
| - ln -s /usr/bin/gcc /usr/bin/s390x-linux-gnu-gcc;\ |
31 |
| - fi |
| 36 | +# Install tools |
32 | 37 |
|
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 |
37 | 39 | RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.55.2
|
38 | 40 |
|
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. |
40 | 42 | RUN wget https://github.com/docker/buildx/releases/download/v0.13.1/buildx-v0.13.1.linux-${ARCH} && \
|
41 | 43 | chmod +x buildx-v0.13.1.linux-${ARCH} && \
|
42 | 44 | 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