forked from rancher/websocket-proxy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dapper
More file actions
60 lines (52 loc) · 2.31 KB
/
Copy pathDockerfile.dapper
File metadata and controls
60 lines (52 loc) · 2.31 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
FROM ubuntu:26.04
ARG DAPPER_HOST_ARCH=amd64
ENV HOST_ARCH=${DAPPER_HOST_ARCH} ARCH=${DAPPER_HOST_ARCH}
ENV DEBIAN_FRONTEND=noninteractive
ARG UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu
RUN set -eux; \
find /etc/apt -type f \( -name '*.list' -o -name '*.sources' \) -exec sed -i \
-e "s|http://security.ubuntu.com/ubuntu|${UBUNTU_MIRROR}|g" \
-e "s|http://archive.ubuntu.com/ubuntu|${UBUNTU_MIRROR}|g" {} +; \
printf 'Acquire::Retries "5";\nAcquire::http::Timeout "30";\nAcquire::https::Timeout "30";\nAcquire::http::Pipeline-Depth "0";\n' > /etc/apt/apt.conf.d/80pasturestack-retries; \
apt-get update && \
apt-get install -y --no-install-recommends \
bash \
ca-certificates \
curl \
file \
gcc \
git \
libc6-dev \
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.2
ARG GO_SHA256_amd64=990e6b4bbba816dc3ee129eaeaf4b42f17c2800b88a2166c265ac1a200262282
ARG GO_SHA256_arm=0000e45577827b0a8868588c543cbe4232853def1d3d7a344ad6e60ce2b015c8
ARG DOCKER_VERSION=29.4.2
ENV GOLANG_ARCH_amd64=amd64 GOLANG_ARCH_arm=armv6l GOLANG_ARCH=GOLANG_ARCH_${ARCH} \
GO_SHA256=GO_SHA256_${ARCH} \
DOCKER_ARCH_amd64=x86_64 DOCKER_ARCH_arm=armhf DOCKER_ARCH=DOCKER_ARCH_${ARCH} \
GOPATH=/go PATH=/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 && \
curl -sfL "https://download.docker.com/linux/static/stable/${!DOCKER_ARCH}/docker-${DOCKER_VERSION}.tgz" | \
tar xzf - -C /usr/bin --strip-components=1 docker/docker && \
chmod +x /usr/bin/docker && \
mkdir -p /go/bin /go/src && \
go version && \
docker --version
ENV DAPPER_SOURCE=/go/src/github.com/PastureStack/websocket-proxy
ENV DAPPER_OUTPUT="bin dist"
ENV DAPPER_DOCKER_SOCKET=true
ENV DAPPER_ENV="TAG REPO"
ENV HOME=/tmp GOCACHE=/tmp/go-build-cache GOMODCACHE=/tmp/go-mod-cache
WORKDIR ${DAPPER_SOURCE}
ENTRYPOINT ["./scripts/entry"]
CMD ["ci"]