-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathDockerfile
More file actions
29 lines (22 loc) · 1.26 KB
/
Dockerfile
File metadata and controls
29 lines (22 loc) · 1.26 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
FROM python:3.7-slim AS build-env
# You can build the docker image with the command :
# docker build --no-cache -t ing .
# You can create a container with :
# docker run -it --rm -e ING_NUM_CLIENT=$ING_NUM_CLIENT -e ING_DATE_NAISSANCE=$ING_DATE_NAISSANCE -e ING_CODE=$ING_CODE ing
RUN apt-get update \
&& apt-get -y install libglib2.0 \
&& apt-get clean \
&& pip install -U --no-cache-dir --target /app ingdirect \
&& find /app | grep -E "(__pycache__|\.pyc|\.pyo$)" | xargs rm -rf
FROM gcr.io/distroless/python3-debian10
COPY --from=build-env /app /app
COPY --from=build-env /usr/lib/x86_64-linux-gnu/libgthread-2.0.a /usr/lib/x86_64-linux-gnu/libgthread-2.0.a
COPY --from=build-env /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0 /usr/lib/x86_64-linux-gnu/libgthread-2.0.so.0
COPY --from=build-env /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0
COPY --from=build-env /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5800.3 /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.5800.3
COPY --from=build-env /lib/x86_64-linux-gnu/libpcre.so.3 /lib/x86_64-linux-gnu/libpcre.so.3
COPY --from=build-env /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6
ENV PYTHONPATH=/app
ENV LC_ALL=C.UTF-8
ENV LANG=C.UTF-8
ENTRYPOINT ["python", "/app/bin/ing.py"]