Add production Dockerfile
Signed-off-by: Florian Wininger <fw.centrale@gmail.com>
This commit is contained in:
parent
d84af1be20
commit
7940e878a8
|
@ -0,0 +1,6 @@
|
|||
.git/
|
||||
.eggs/
|
||||
.github/
|
||||
.pytest_cache/
|
||||
*.egg-info/
|
||||
*.egg
|
|
@ -0,0 +1,35 @@
|
|||
FROM debian:buster-slim as build
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
LANG=en_US.UTF-8
|
||||
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
RUN apt update \
|
||||
&& apt install python3 python3-setuptools ca-certificates -y \
|
||||
&& apt clean -yq \
|
||||
&& apt autoremove -yq \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& truncate -s 0 /var/log/*log
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN python3 setup.py install
|
||||
|
||||
FROM debian:buster-slim
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive \
|
||||
LANG=en_US.UTF-8 \
|
||||
PYTHONDONTWRITEBYTECODE=1
|
||||
|
||||
RUN apt update \
|
||||
&& apt install python3 python3-setuptools -y \
|
||||
&& apt clean -yq \
|
||||
&& apt autoremove -yq \
|
||||
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
|
||||
&& truncate -s 0 /var/log/*log
|
||||
|
||||
COPY --from=build /usr/local/lib/python3.7/dist-packages/ /usr/local/lib/python3.7/dist-packages/
|
||||
COPY --from=build /usr/local/bin/wapiti /usr/local/bin/wapiti-getcookie /usr/local/bin/
|
||||
|
||||
CMD ["wapiti"]
|
Loading…
Reference in New Issue