-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpython-runner.Dockerfile
50 lines (31 loc) · 1.44 KB
/
python-runner.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
FROM python:3.8-buster
ARG TINI_VERSION=v0.19.0
RUN apt-get update && \
apt-get install -y curl && \
curl -Lo /usr/local/bin/tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-amd64 && \
chmod +x /usr/local/bin/tini
RUN apt-get install -y openssh-server && \
# Creating /run/sshd instead of /var/run/sshd, because in the Debian
# image /var/run is a symlink to /run. Creating /var/run/sshd directory
# as proposed in the Docker documentation linked above just doesn't
# work.
mkdir -p /run/sshd
EXPOSE 22
ARG GITLAB_RUNNER_VERSION=v11.10.1
RUN curl -Lo /usr/local/bin/gitlab-runner https://gitlab-runner-downloads.s3.amazonaws.com/${GITLAB_RUNNER_VERSION}/binaries/gitlab-runner-linux-amd64 && \
chmod +x /usr/local/bin/gitlab-runner && \
# Test if the downloaded file was indeed a binary and not, for example,
# an HTML page representing S3's internal server error message or something
# like that.
gitlab-runner --version
RUN apt-get install -y bash ca-certificates git git-lfs \
python3 \
python3-pip \
python3-setuptools && \
git lfs install --skip-repo && \
pip3 install --upgrade pip
RUN pip3 --no-cache-dir install --upgrade awscli
RUN rm -rf /var/lib/apt/lists/*
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
RUN chmod +x /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT ["tini", "--", "/usr/local/bin/docker-entrypoint.sh"]