-
Notifications
You must be signed in to change notification settings - Fork 5
/
Dockerfile
56 lines (43 loc) · 1.32 KB
/
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
FROM python:3.8
WORKDIR /usr/src/app
RUN apt-get update && \
apt-get install -y locales && \
dpkg-reconfigure --frontend=noninteractive locales
RUN pip install --no-cache-dir awscli
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
ENV PATH="/usr/src/app:${PATH}"
ENV PYTHONPATH="/usr/src/app:${PYTHONPATH}"
ENV GETTY_PIPELINE_INPUT=/data
ENV GETTY_PIPELINE_COMMON_SERVICE_FILES_PATH=/data/common
ENV GETTY_PIPELINE_OUTPUT=/output
ENV GETTY_PIPELINE_TMP_PATH=/tmp
ENV PYTHON=/usr/local/bin/python
ENV LC_ALL="C"
ENV LC_CTYPE="C"
COPY scripts scripts
COPY pipeline pipeline
COPY tests tests
COPY data/common /data/common
COPY Makefile setup.py aata.py sales.py knoedler.py people.py settings.py ./
FROM swift:latest
WORKDIR /usr/src/swift
RUN mkdir scripts
COPY Makefile ./
COPY scripts/find_matching_json_files.swift ./scripts/
RUN make scripts/find_matching_json_files
FROM python:3.8
WORKDIR /usr/src/app
RUN pip install --no-cache-dir awscli
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY --from=0 /usr/src/app ./
COPY --from=1 /usr/src/swift/scripts/find_matching_json_files scripts/
COPY --from=1 /usr/lib/swift /usr/lib/swift
ENV LC_ALL="C"
ENV LC_CTYPE="C"
EXPOSE 8080
VOLUME ["/data"]
VOLUME ["/output"]
VOLUME ["/services"]
CMD [ "make", "sales", "LIMIT=100" ]