forked from PyAr/asoc_members
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (22 loc) · 998 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
FROM python:3.9
ENV PYTHONUNBUFFERED 1
ENV PYTHONPATH /code:$PYTHONPATH
RUN mkdir /code
RUN mkdir /config
# Install dependencies
RUN apt-get update && apt-get install -y inkscape && apt-get clean
COPY /config/requirements.txt /config/
RUN pip install --no-cache-dir -r /config/requirements.txt
# Workaround to use pyafipws in python3 (first instally m2crypto pinned to the version that actually builds)
RUN pip install m2crypto==0.33.0
# Copy code
WORKDIR /code
COPY . /code/
# Set working dir
WORKDIR /code/website
# Patch SSL config so we can work with AFIP (see the following issue
# for more info: https://github.com/PyAr/asoc_members/issues/133 )
RUN sed -i 's/CipherString = DEFAULT@SECLEVEL=2/CipherString = DEFAULT@SECLEVEL=1/' /etc/ssl/openssl.cnf
# Bring pyafipws branch and install it's dependencies
RUN wget https://github.com/PyAr/pyafipws/archive/py3k.zip && unzip py3k.zip && mv pyafipws-py3k pyafipws
RUN pip install --no-cache-dir -r /code/website/pyafipws/requirements.txt