forked from dagster-io/dagster
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
49 lines (37 loc) · 1.31 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
####################################################################################################
#
# DAGSTER BUILDKITE TEST IMAGE BUILDER
# This image is used to bootstrap the test image building process
#
####################################################################################################
ARG BASE_IMAGE
FROM "${BASE_IMAGE}"
# Next two commands lifted from https://github.com/jpetazzo/dind/blob/master/Dockerfile
# Let's start with some basic stuff.
RUN apt-get update && apt-get install -y \
apt-transport-https \
ca-certificates \
curl \
lxc \
iptables
RUN curl -sSL https://get.docker.com/ > install_docker.sh
RUN pip install pex==2.1.12
ADD requirements.txt .
RUN pex -r requirements.txt -m awscli -o aws.pex
# Now we usage a multistage build to remove the cruft above
# that was needed to get the shell script
FROM "${BASE_IMAGE}"
WORKDIR /scriptdir
COPY --from=0 install_docker.sh .
COPY --from=0 aws.pex .
RUN sh install_docker.sh && \
chmod +x aws.pex && \
# Buildkite mounts the checkout to /workdir
# Requires git in order to do that
apt-get update && \
apt-get install -y git rsync && \
apt-get remove -yqq && \
apt-get autoremove -yqq --purge && \
apt-get clean && \
rm install_docker.sh && \
rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/*