-
Notifications
You must be signed in to change notification settings - Fork 15
/
Dockerfile
48 lines (48 loc) · 1.56 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
42
43
44
45
46
47
48
FROM python:3.10-alpine
RUN apk update && \
apk upgrade && \
apk add --virtual .build-deps \
build-base \
linux-headers && \
apk add \
bash \
curl \
git \
gnupg \
libc6-compat \
libffi \
libstdc++ \
libxslt \
musl-dev \
nginx \
openldap-dev \
openssh-client \
openssh-keygen \
openssl \
rsync \
runit \
sshpass && \
curl -sSL https://install.python-poetry.org | python -
ENV PATH="/root/.local/bin:$PATH"
COPY pyproject.toml poetry.lock /adcm/
RUN python -m venv /adcm/venv/2.9 && \
poetry config virtualenvs.create false && \
poetry -C /adcm install --no-root && \
cp -r /usr/local/lib/python3.10/site-packages /adcm/venv/2.9/lib/python3.10 && \
. /adcm/venv/2.9/bin/activate && \
pip install git+https://github.com/arenadata/ansible.git@v2.9.27-p1 && \
deactivate
RUN apk del .build-deps
COPY . /adcm
RUN mkdir -p /adcm/data/log && \
mkdir -p /usr/share/ansible/plugins/modules && \
cp -r /adcm/os/* / && \
cp /adcm/os/etc/crontabs/root /var/spool/cron/crontabs/root && \
cp -r /adcm/python/ansible/* /usr/local/lib/python3.10/site-packages/ansible/ && \
cp -r /adcm/python/ansible/* /adcm/venv/2.9/lib/python3.10/site-packages/ansible/ && \
python /adcm/python/manage.py collectstatic --noinput && \
cp -r /adcm/wwwroot/static/rest_framework/css/* /adcm/wwwroot/static/rest_framework/docs/css/
ARG ADCM_VERSION
ENV ADCM_VERSION=$ADCM_VERSION
EXPOSE 8000
CMD ["/etc/startup.sh"]