forked from rancher/catalog-service
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dapper
More file actions
68 lines (59 loc) · 2.3 KB
/
Copy pathDockerfile.dapper
File metadata and controls
68 lines (59 loc) · 2.3 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 ubuntu:26.04@sha256:3131b4cc82a783df6c9df078f86e01819a13594b865c2cad47bd1bca2b7063bb
ARG DAPPER_HOST_ARCH=amd64
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && \
apt-get install -y --no-install-recommends \
bash \
ca-certificates \
curl \
file \
gcc \
git \
libc6-dev \
python3 \
python3-pip \
python3-venv \
tar \
xz-utils && \
rm -rf /var/lib/apt/lists/* && \
rm -f /usr/bin/pebble && \
rm -f /bin/sh && ln -s /bin/bash /bin/sh
RUN git config --system --add safe.directory '*'
ARG GO_VERSION=1.26.5
ARG GO_SHA256_amd64=5c2c3b16caefa1d968a94c1daca04a7ca301a496d9b086e17ad77bb81393f053
ARG GO_SHA256_arm=6dae9edab81c13bccf962dec15f1fd2ec26c14a6821b4d2c92dab4130c289d7a
ARG PIP_VERSION=26.1.2
ARG SETUPTOOLS_VERSION=83.0.0
ARG WHEEL_VERSION=0.47.0
ARG TOX_VERSION=4.57.2
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
GO_SHA256=GO_SHA256_${ARCH} \
GOPATH=/go PATH=/opt/tox/bin:/go/bin:/usr/local/go/bin:${PATH} SHELL=/bin/bash \
GO111MODULE=off GO15VENDOREXPERIMENT=1
RUN curl -fsSL -o /tmp/go.tgz "https://go.dev/dl/go${GO_VERSION}.linux-${!GOLANG_ARCH}.tar.gz" && \
echo "${!GO_SHA256} /tmp/go.tgz" | sha256sum -c - && \
tar -C /usr/local -xzf /tmp/go.tgz && \
rm -f /tmp/go.tgz && \
python3 -m venv /opt/tox && \
/opt/tox/bin/pip install --no-cache-dir --upgrade \
"pip==${PIP_VERSION}" \
"setuptools==${SETUPTOOLS_VERSION}" \
"wheel==${WHEEL_VERSION}" \
"tox==${TOX_VERSION}" && \
mkdir -p /go/bin /go/src && \
go version && \
python3 --version && \
tox --version
COPY integration/requirements.lock /tmp/catalog-service-test-requirements.lock
RUN mkdir -p /opt/catalog-service-wheelhouse && \
/opt/tox/bin/pip download \
--dest /opt/catalog-service-wheelhouse \
--requirement /tmp/catalog-service-test-requirements.lock && \
rm -f /tmp/catalog-service-test-requirements.lock
ENV DAPPER_SOURCE=/go/src/github.com/PastureStack/catalog-service/
ENV DAPPER_OUTPUT="./bin ./dist"
ENV HOME=/tmp GOCACHE=/tmp/go-build-cache GOMODCACHE=/tmp/go-mod-cache
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]