-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
41 lines (34 loc) · 1.52 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
FROM python:3.13-alpine
LABEL maintainer="OpenSVC Ansible Team <ansible@opensvc.com>"
LABEL vendor1="OpenSVC"
ARG REQUIREMENTS_FILE=requirements.txt
COPY $REQUIREMENTS_FILE /tmp
RUN apk add --update --no-cache ca-certificates \
openssh-client \
build-base \
cargo \
gcc \
g++ \
git \
make \
python3-dev \
py-pip \
libffi-dev \
rust \
shellcheck \
sshpass \
libressl-dev &&\
pip install --upgrade pip && \
pip install -r /tmp/$REQUIREMENTS_FILE &&\
apk del -r --purge gcc make g++ rust &&\
rm -rf /source/* &&\
rm -rf /var/cache/apk/* &&\
rm -rf /tmp/*
WORKDIR /opt
ADD ansible_collections/opensvc/ /opt/opensvc/
RUN ansible-galaxy collection build --force opensvc/cluster opensvc/cluster_v3 opensvc/app && \
for i in *.tar.gz; do ansible-galaxy collection install $i -p /usr/share/ansible/collections; done
WORKDIR /examples
COPY ./docker-entrypoint.sh /
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["check"]