-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (24 loc) · 888 Bytes
/
Dockerfile
File metadata and controls
32 lines (24 loc) · 888 Bytes
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
FROM mavfav/alpandas:latest as builder
WORKDIR /app
RUN apk add --no-cache --update \
postgresql-dev \
uwsgi-python3
COPY requirements.txt .
RUN .venv/bin/pip install --no-cache-dir -r requirements.txt && find /app/.venv \( -type d -a -name test -o -name tests \) -o \( -type f -a -name '*.pyc' -o -name '*.pyo' \) -exec rm -rf '{}' \+
FROM alpine:3.13
LABEL maintainer="Mayank <mp@mailx.es>"
EXPOSE 4444
WORKDIR /app/http-api
RUN apk add --no-cache --update \
uwsgi-python3 \
libstdc++ \
libpq \
py-pip
RUN mkdir -p /run/uwsgi/ \
&& pip install uwsgitop \
&& adduser -DHs /sbin/nologin rauser \
&& chown -R rauser.rauser /run/uwsgi/ /app/
COPY --from=builder /app /app/http-api
COPY . /app/http-api
ENV PATH="/app/http-api/.venv/bin:$PATH"
CMD [ "/usr/sbin/uwsgi", "--ini", "/app/http-api/conf/uwsgi.ini" ]