-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
40 lines (26 loc) · 1.01 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
# Builder Image
FROM python:3.10-slim-bullseye as builder
RUN apt-get update && \
apt-get install -y --no-install-recommends \
build-essential \
libffi-dev \
git && \
apt-get clean -y
RUN mkdir -p /srv/docker-ansible
COPY requirements.txt /srv/docker-ansible/requirements.txt
COPY galaxy-requirements.yaml /srv/docker-ansible/galaxy-requirements.yaml
RUN python3 -m venv /srv/docker-ansible/env && \
/srv/docker-ansible/env/bin/pip install -r /srv/docker-ansible/requirements.txt
# Final Image
FROM python:3.10-slim-bullseye
MAINTAINER New England Research Cloud (NERC) "https://nerc.mghpcc.org"
RUN apt-get update && \
apt-get install -y --no-install-recommends \
ssh \
git \
&& apt-get clean -y
COPY --from=builder /srv/docker-ansible /srv/docker-ansible
COPY lint.sh /srv/docker-ansible/env/bin/lint.sh
RUN /srv/docker-ansible/env/bin/ansible-galaxy install -r /srv/docker-ansible/galaxy-requirements.yaml
ENTRYPOINT []
CMD ["/srv/docker-ansible/env/bin/ansible-playbook"]