-
Notifications
You must be signed in to change notification settings - Fork 71
Expand file tree
/
Copy pathDockerfile.dapper
More file actions
49 lines (40 loc) · 2.17 KB
/
Dockerfile.dapper
File metadata and controls
49 lines (40 loc) · 2.17 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
FROM registry.suse.com/bci/golang:1.25@sha256:5c3c7bbc18b72b8bdf5d034263cbf7442569ce4ee94b5eb90a7e5eeb18c01fe2 AS gobuilder
ARG DAPPER_HOST_ARCH
ARG http_proxy
ARG https_proxy
ARG SRC_BRANCH=master
ARG SRC_TAG
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_ENV TAG REPO DRONE_REPO DRONE_PULL_REQUEST DRONE_COMMIT_REF SKIP_TASKS
ENV DAPPER_OUTPUT bin coverage.out
ENV DAPPER_RUN_ARGS --privileged --tmpfs /go/src/github.com/longhorn/longhorn-engine/integration/.venv:exec --tmpfs /go/src/github.com/longhorn/longhorn-engine/integration/.tox:exec -v /dev:/host/dev -v /proc:/host/proc
ENV DAPPER_SOURCE /go/src/github.com/longhorn/longhorn-instance-manager
ENV SRC_BRANCH ${SRC_BRANCH}
ENV SRC_TAG ${SRC_TAG}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]
RUN zypper -n ref && \
zypper update -y
# Install packages
RUN zypper -n install cmake wget curl git less file \
libglib-2_0-0 libkmod-devel libnl3-devel linux-glibc-devel pkg-config \
psmisc tox qemu-tools fuse python3-devel git zlib-devel zlib-devel-static \
bash-completion rdma-core-devel libibverbs xsltproc docbook-xsl-stylesheets \
perl-Config-General libaio-devel glibc-devel-static glibc-devel iptables libltdl7 libdevmapper1_03 iproute2 jq docker gcc gcc-c++ && \
rm -rf /var/cache/zypp/*
# Install golanci-lint
RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin latest
# Install libqcow to resolve error:
# vendor/github.com/longhorn/longhorn-engine/pkg/qcow/libqcow.go:6:11: fatal error: libqcow.h: No such file or directory
RUN curl -sSfL https://s3-us-west-1.amazonaws.com/rancher-longhorn/libqcow-alpha-20181117.tar.gz | tar xvzf - -C /usr/src && \
cd /usr/src/libqcow-20181117 && \
./configure && \
make -j$(nproc) && \
make install && \
ldconfig
# Docker Builx: The docker version in dapper is too old to have buildx. Install it manually.
RUN curl -sSfLO https://github.com/docker/buildx/releases/download/v0.13.1/buildx-v0.13.1.linux-${ARCH} && \
chmod +x buildx-v0.13.1.linux-${ARCH} && \
mv buildx-v0.13.1.linux-${ARCH} /usr/local/bin/buildx