generated from howaboutudance/pytemplate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.ecs
33 lines (29 loc) · 961 Bytes
/
Dockerfile.ecs
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 as source
WORKDIR app
COPY ./requirements.txt ./
COPY ./setup.py ./ README.md ./
RUN pip3 install -r requirements.txt
COPY ./pystandlogger/. ./pystandlogger
FROM source as test
COPY ./test ./test
COPY ./tox.ini ./ ./requirements-dev.txt ./
RUN pip3 install -r requirements-dev.txt
COPY config/credentials.txt /root/.aws/credentials
CMD tox -e py39 && mypy pystandlogger/
FROM source as builder
RUN pip3 install --no-cache-dir wheel
RUN python setup.py bdist_wheel
FROM python:3.9 as interact
COPY --from=builder /app/dist ./app/dist
COPY config/credentials.txt /root/.aws/credentials
WORKDIR app
COPY ./requirements-interact.txt ./
RUN pip3 install -r requirements-interact.txt && pip3 install dist/pystandlogger*
CMD ipython
FROM python:3.9-slim as app
COPY --from=builder /app/dist ./app/dist
WORKDIR app
ENV N_RECORDS 200
RUN pip3 install dist/pystandlogger*
COPY config/credentials.txt /root/.aws/credentials
CMD python -m pystandlogger