-
Notifications
You must be signed in to change notification settings - Fork 8
/
Dockerfile
80 lines (65 loc) · 2.64 KB
/
Dockerfile
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
# Dockerfile to run the staging tests
ARG DISTRO_NAME
ARG DISTRO_VERS
ARG REPO_HOSTNAME=download-stage.docker.com
FROM ppc64le/$DISTRO_NAME:$DISTRO_VERS
ARG DISTRO_NAME
ARG DISTRO_VERS
ARG REPO_HOSTNAME
WORKDIR /workspace
RUN mkdir -p /workspace
ENV WORKSPACE=/workspace \
TERM=xterm
ENV PATH /usr/local/go/bin:$PATH
ARG TINI_VERSION=v0.19.0
RUN yum install -y dnf-plugins-core || :; \
yum config-manager --set-enabled crb || :; \
yum config-manager --set-enabled powertools || :; \
yum config-manager --set-enabled PowerTools || :
RUN set -eux; yum -y install make gcc git glibc-static cmake findutils procps-ng && \
yum -y clean all
RUN set -eux; yum install -y yum-utils &&\
yum-config-manager --add-repo https://${REPO_HOSTNAME}/linux/${DISTRO_NAME}/docker-ce-staging.repo &&\
yum -y install docker-ce docker-ce-cli containerd.io
##
#Docker in Docker inspired from
# https://github.com/docker-library/docker/tree/master/20.10/dind
# set up subuid/subgid so that "--userns-remap=default" works out-of-the-box
##
RUN set -eux; \
groupadd --system dockremap; \
adduser --system -g dockremap dockremap; \
echo 'dockremap:165536:65536' >> /etc/subuid; \
echo 'dockremap:165536:65536' >> /etc/subgid
# Commit pointing to the latest Docker-in-Docker script as of January, 2024.
# https://github.com/moby/moby/tree/master/hack/dind
ARG DIND_COMMIT=65cfcc28ab37cb75e1560e4b4738719c07c6618e
# Commit pointing to the latest stable Dockerd-entrypoint script as of January, 2024.
# https://github.com/docker-library/docker/tree/master/25/dind
ARG DOCKERD_COMMIT=b317cabfb873fef32ac8cad0cd58d6e6c32a63a4
ARG TINI_VERSION=v0.19.0
COPY test-launch.sh /usr/local/bin/test-launch.sh
RUN set -eux; \
curl "https://raw.githubusercontent.com/moby/moby/${DIND_COMMIT}/hack/dind" -o /usr/local/bin/dind; \
curl "https://raw.githubusercontent.com/docker-library/docker/${DOCKERD_COMMIT}/27/dind/dockerd-entrypoint.sh" -o /usr/local/bin/dockerd-entrypoint.sh; \
chmod +x /usr/local/bin/dind; \
chmod +x /usr/local/bin/dockerd-entrypoint.sh; \
git clone https://github.com/krallin/tini.git "/workspace/tini"; \
pushd ./tini; \
git checkout -q "$TINI_VERSION"; \
cmake .; \
make tini-static; \
cp tini-static "/usr/local/bin/docker-init"; \
popd; \
chmod +x /usr/local/bin/test-launch.sh;
ARG GO_VERSION=1.22.5
RUN set -eux; \
url="https://dl.google.com/go/${GO_VERSION}";\
curl "$url" -o go.tgz --progress-bar; \
tar -C /usr/local -xzf go.tgz; \
rm go.tgz; \
go version;
VOLUME /var/lib/docker
EXPOSE 2375 2376
ENTRYPOINT ["/usr/local/bin/test-launch.sh"]
CMD []