forked from cloud-bulldozer/snappy-data-server
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
30 lines (22 loc) · 691 Bytes
/
Dockerfile
File metadata and controls
30 lines (22 loc) · 691 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
FROM docker.io/library/python:3.9.5
LABEL maintainer="Matthew F Leader <mleader@redhat.com>"
ENV PATH=/root/.local/bin:$PATH \
LANG=C.UTF-8
ENV APP_ROOT=/data_server
ENV PYTHONPATH=${APP_ROOT}/app
RUN mkdir ${APP_ROOT}
COPY ./app ${APP_ROOT}/app/
COPY pyproject.toml ${APP_ROOT}/pyproject.toml
WORKDIR ${APP_ROOT}
# need psycopg2 for sqlalchemy to create db relations
# psycopg2 dependencies:
# gcc, libpq-devel
RUN apt-get update && \
apt-get install --yes \
gcc \
libpq-dev && \
python -m pip install poetry && \
poetry config virtualenvs.create false && \
poetry install --no-dev
WORKDIR ${APP_ROOT}/app
CMD ["/bin/sh", "./scripts/start.sh"]