forked from rancher/agent
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dapper
More file actions
102 lines (92 loc) · 4.41 KB
/
Copy pathDockerfile.dapper
File metadata and controls
102 lines (92 loc) · 4.41 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
# syntax=docker/dockerfile:1.7
FROM ubuntu:26.04@sha256:2260313b31c8c011cd2eebe728008efac1b3982be73eb71348ea2648d2c0e09b
RUN rm -f /usr/bin/pebble
ARG DAPPER_HOST_ARCH=amd64
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
ENV DEBIAN_FRONTEND=noninteractive
ARG UBUNTU_SNAPSHOT=20260825T000000Z
ADD --checksum=sha256:6077d27c6b6f8b23590cb01ff877ed8c804a67a5442cc32b5a33da10d2bd0e90 \
https://snapshot.ubuntu.com/ubuntu/20260825T000000Z/pool/main/c/ca-certificates/ca-certificates_20260601~26.04.1_all.deb \
/tmp/ca-certificates.deb
RUN set -eux; \
mkdir -p /tmp/ca-bootstrap /etc/ssl/certs; \
dpkg-deb --extract /tmp/ca-certificates.deb /tmp/ca-bootstrap; \
find /tmp/ca-bootstrap/usr/share/ca-certificates -type f -name '*.crt' | LC_ALL=C sort | while IFS= read -r certificate; do sed -e '$a\' "${certificate}"; done > /etc/ssl/certs/ca-certificates.crt; \
rm -rf /tmp/ca-bootstrap /tmp/ca-certificates.deb; \
rm -f /etc/apt/sources.list /etc/apt/sources.list.d/*.list /etc/apt/sources.list.d/*.sources; \
printf 'Types: deb\nURIs: https://snapshot.ubuntu.com/ubuntu/%s\nSuites: resolute resolute-updates resolute-backports resolute-security\nComponents: main universe restricted multiverse\nSigned-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg\nSnapshot: no\n' "${UBUNTU_SNAPSHOT}" > /etc/apt/sources.list.d/pasturestack-snapshot.sources; \
printf 'Acquire::Retries "5";\nAcquire::http::Timeout "30";\nAcquire::https::Timeout "30";\nAcquire::http::Pipeline-Depth "0";\nAcquire::https::CaInfo "/etc/ssl/certs/ca-certificates.crt";\nAcquire::https::Verify-Peer "true";\nAcquire::https::Verify-Host "true";\nAcquire::AllowInsecureRepositories "false";\nAPT::Get::AllowUnauthenticated "false";\n' > /etc/apt/apt.conf.d/80pasturestack-snapshot; \
apt-get update && \
apt-get install -y --no-install-recommends \
bash \
busybox-static \
ca-certificates \
containerd \
curl \
docker.io \
file \
gcc \
git \
iproute2 \
iptables \
libc6-dev \
make \
python3 \
python3-pip \
python3-venv \
runc \
tar \
util-linux \
uuid-runtime \
xz-utils \
zip && \
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.27.0
ARG GO_SHA256_amd64=675c26c449cbb18fc24b74650de1eabbae6e16f64326fd85a283fb3b58280685
ARG GO_SHA256_arm=e337ecd9c321377c0d8832690c2cb10463447c0bd0e65e2e3413dfff63a3435b
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=on GOFLAGS=-mod=vendor
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 && \
docker --version && \
dockerd --version && \
containerd --version && \
runc --version && \
python3 --version && \
tox --version
# Resolve the fully pinned test dependency set once while building the disposable
# build image. Clean source checkouts then run without reaching PyPI.
COPY tests/requirements.lock /tmp/node-agent-test-requirements.lock
RUN mkdir -p /opt/node-agent-wheelhouse && \
/opt/tox/bin/pip download \
--dest /opt/node-agent-wheelhouse \
--requirement /tmp/node-agent-test-requirements.lock && \
rm -f /tmp/node-agent-test-requirements.lock
ENV DAPPER_SOURCE=/go/src/github.com/PastureStack/node-agent
ENV DAPPER_OUTPUT="bin dist"
ENV DAPPER_ENV="TAG REPO CROSS VERSION_OVERRIDE NO_TEST TEST_BUSYBOX_IMAGE TEST_BUSYBOX_ALIAS"
ENV DAPPER_RUN_ARGS="--privileged --cgroupns=host"
ENV HOME=/tmp GOCACHE=/tmp/go-build-cache GOMODCACHE=/tmp/go-mod-cache
WORKDIR ${DAPPER_SOURCE}
VOLUME "/var/lib/docker"
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]