-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile-player
76 lines (63 loc) · 2.43 KB
/
Dockerfile-player
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
# Dockerfile to build the controller (playbook runner) image.
# this is an image that contains the Ansible playbooks
# and all the requirements to run them.
#
# The container runs as root.
FROM python:3.8.20-bullseye
LABEL maintainer="Tim Dudgeon<tdudgeon@informaticsmatters.com>"
ARG NF_VERSION=20.10.0
ARG KUBECTL_VERSION=1.31.3
USER root
# Force the binary layer of the stdout and stderr streams
# to be unbuffered
ENV PYTHONUNBUFFERED=1
# Install Java (required by nextflow)
RUN apt-get update -y && \
apt-get install -y \
default-jdk
# Install nextflow
# and run a nextflow command to force it to pull down dependent code...
RUN wget -qO- https://get.nextflow.io | bash && \
chmod 755 nextflow && \
mv nextflow /usr/local/bin && \
nextflow -version
# And create the 'home' directory.
# If we don't do this now nextflow won't be able to write to the directory
# if we rely on the directory being created once the config's mapped in.
WORKDIR ${HOME}/.nextflow
# Install kubectl
RUN apt-get install -y \
apt-transport-https \
curl \
gnupg2 && \
curl -LO https://dl.k8s.io/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl && \
install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
# A file for the kubernetes config.
# This will be mapped into the container via a Kubernetes ConfigMap
# as '~/.kube/config' and copied to '~/kubeconfig' as the container starts.
# This is required because configmaps are mounted read-only and you
# get...
# error: open /root/.kube/config.lock: read-only file system
# ...when using kubectl.
ENV KUBECONFIG=${HOME}/kubeconfig
# Install PSQL (for the psql command).
# See https://www.postgresql.org/download/linux/debian/
# At last attempt this installed 12.5
RUN apt-get install -y \
lsb-release && \
sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' && \
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add - && \
apt-get update -y && \
apt-get install -y \
postgresql-12 && \
/usr/local/bin/python -m pip install --upgrade pip
# - copy requirements in
# - install requirements
COPY requirements.txt /root/
RUN pip install -r /root/requirements.txt
COPY docker-player-entrypoint.sh /root/
COPY ansible/ /root/ansible/
RUN chmod 755 /root/*.sh && \
chown -R root:root /root
WORKDIR /root
CMD ["./docker-player-entrypoint.sh"]