forked from rancher/backup-restore-operator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.dapper
48 lines (38 loc) · 1.8 KB
/
Dockerfile.dapper
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
FROM ghcr.io/oracle/oraclelinux:7-slim
ARG DAPPER_HOST_ARCH
ENV ARCH $DAPPER_HOST_ARCH
ENV GOPATH=/go PATH=/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash
RUN yum-config-manager --enable ol7_optional_latest && \
yum-config-manager --enable ol7_addons
RUN yum update -y && \
# software collections repo needed for git 2.x on OL7
yum-config-manager --add-repo=http://yum.oracle.com/repo/OracleLinux/OL7/SoftwareCollections/x86_64 && \
yum install -y bash rh-git227 gcc musl-dev glibc-static docker-cli vim less libffi file curl wget ca-certificates unzip tar && \
# Set up needed to ensure git 2.27 from rh-git227 is on the path
ln /opt/rh/rh-git227/enable /etc/profile.d/git.sh && \
source /etc/profile.d/git.sh && \
git version
# Update PATH to make sure git 2.27 is on the path
ENV PATH="/opt/rh/rh-git227/root/usr/bin:${PATH}"
RUN yum install -y oracle-golang-release-el7 && \
yum-config-manager --disable ol7_developer_golang\* && \
yum-config-manager --add-repo https://yum.oracle.com/repo/OracleLinux/OL7/developer_EPEL/x86_64 && \
yum install golang-1.20.10-3.el7.x86_64 -y
RUN if [ "${ARCH}" == "amd64" ]; then \
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.55.2; \
fi
RUN curl -sL https://get.helm.sh/helm-v3.9.0-linux-${ARCH}.tar.gz | tar xvzf - -C /usr/local/bin --strip-components=1
ENV DAPPER_ENV REPO TAG DRONE_TAG CROSS USE_DOCKER_BUILDX
ENV DAPPER_SOURCE /go/src/github.com/rancher/backup-restore-operator/
ENV DAPPER_OUTPUT ./bin ./dist
ENV GOCACHE /root/.cache/go-build
ENV GOPATH /go
ENV DAPPER_DOCKER_SOCKET true
ENV DAPPER_RUN_ARGS --privileged
VOLUME /var/lib/rancher/k3s
VOLUME /var/lib/cni
VOLUME /var/log
ENV HOME ${DAPPER_SOURCE}
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]