-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathdind.dockerfile
executable file
·48 lines (35 loc) · 1.12 KB
/
dind.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
#!/usr/bin/env -S docker build --compress -t pvtmert/dind:latest -f
ARG BASE=centos
FROM debian:latest AS debian
RUN apt update
RUN apt install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
RUN add-apt-repository \
"deb https://download.docker.com/linux/debian $(lsb_release -cs) stable"
RUN apt-get update
RUN apt-get install -ydocker-ce docker-ce-cli containerd.io
FROM ubuntu:latest AS ubuntu
RUN apt update
RUN apt install -y \
apt-transport-https \
ca-certificates \
curl \
gnupg-agent \
software-properties-common
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
RUN add-apt-repository \
"deb https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
RUN apt update
RUN apt install -y docker-ce docker-ce-cli containerd.io
FROM centos:latest AS centos
ADD \
"https://download.docker.com/linux/centos/docker-ce.repo" \
"/etc/yum.repos.d/docker.repo"
RUN yum install -y docker-ce docker-ce-cli containerd.io
FROM scratch AS final
COPY --from=${BASE} / /