-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (28 loc) · 1.13 KB
/
Dockerfile
File metadata and controls
36 lines (28 loc) · 1.13 KB
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
# Docker file to build container image based on
# a miniconda image from the docker cloud
FROM python:3.7-slim AS builder
LABEL maintainer="Sebastian Arboleda <sebastian.a.arboleda@lions.enc.edu>"
LABEL Name="connector Version=0.1.0"
# Keeps Python from generating .pyc files in the container
# and turns off buffering for easier container logging
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
COPY ./requirements /opt/connector/requirements
COPY ./connector /opt/connector
WORKDIR /opt/connector
# ============ PRODUCTION ENV ============
FROM builder AS production
RUN python -m pip install -r /opt/connector/requirements/prod.txt
CMD /bin/bash -c "python -u connector/connector.py"
# ============ TESTING ENV ============
FROM builder AS testing
COPY ./tests /opt/connector/tests
COPY ./test.sh /opt/connector
RUN python -m pip install -r /opt/connector/requirements/test.txt
CMD ["./test.sh"]
# ============ DEVELOPMENT ENV ============
FROM builder AS development
COPY ./tests /opt/tests
COPY ./test.sh /opt/connector
RUN python -m pip install -r /opt/connector/requirements/dev.txt
CMD /bin/bash -c "python -u connector.py"