-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathDockerfile
33 lines (26 loc) · 996 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
32
33
FROM python:3.9-slim-bullseye AS compile-image
LABEL maintainer="Wazo Maintainers <[email protected]>"
RUN python -m venv /opt/venv
# Activate virtual env
ENV PATH="/opt/venv/bin:$PATH"
COPY . /usr/src/wazo-calld
WORKDIR /usr/src/wazo-calld
RUN pip install -r requirements.txt
RUN pip install .
FROM python:3.9-slim-bullseye AS build-image
COPY --from=compile-image /opt/venv /opt/venv
COPY ./etc/wazo-calld /etc/wazo-calld
COPY ./bin/wazo-pdf2fax /usr/bin/wazo-pdf2fax
RUN true \
&& apt-get -q update \
&& apt-get -yq install --no-install-recommends ghostscript \
&& adduser --quiet --system --group --home /var/lib/wazo-calld wazo-calld \
&& mkdir -p /etc/wazo-calld/conf.d \
&& mkdir -p /var/spool/asterisk/voicemail \
&& install -o www-data -g www-data /dev/null /var/log/wazo-calld.log \
&& chown root:www-data /usr/bin/wazo-pdf2fax \
&& rm -fr /var/lib/apt/lists/*
EXPOSE 9500
# Activate virtual env
ENV PATH="/opt/venv/bin:$PATH"
CMD ["wazo-calld"]