-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (23 loc) · 878 Bytes
/
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
FROM ubuntu:jammy
USER root
# install packages
RUN apt-get clean && rm -rf /var/lib/apt/lists/partial \
&& apt-get update -o Acquire::CompressionTypes::Order::=gz \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends -y \
ca-certificates gnupg git python3 python3-pip keychain
# copy dle-se-ansible repository
ADD . /dle-se-ansible
# install ansible (latest version)
RUN pip3 install ansible \
boto3 dopy google-auth hcloud
# install requirements
RUN cd dle-se-ansible && \
ansible-galaxy install -r requirements.yml
# clean
RUN apt-get autoremove -y --purge gnupg git \
&& apt-get clean -y autoclean \
&& rm -rf /var/lib/apt/lists/* /tmp/*
# set environment variable for Ansible collections paths
ENV ANSIBLE_COLLECTIONS_PATHS=/usr/lib/python3/dist-packages/ansible_collections
ENV USER=root
WORKDIR /dle-se-ansible