1
2
mirror of https://github.com/vimagick/dockerfiles synced 2024-06-25 00:08:49 +00:00
dockerfiles/fteproxy/Dockerfile
Pratik raj b113da5d19 chore: Use --no-cache-dir flag to pip in Dockerfiles, to save space
Using "--no-cache-dir" flag in pip install ,make sure dowloaded packages
by pip don't cached on system . This is a best practise which make sure
to fetch ftom repo instead of using local cached one . Further , in case
of Docker Containers , by restricing caching , we can reduce image size.
In term of stats , it depends upon the number of python packages
multiplied by their respective size . e.g for heavy packages with a lot
of dependencies it reduce a lot by don't caching pip packages.

Further , more detail information can be found at

https://medium.com/sciforce/strategies-of-docker-images-optimization-2ca9cc5719b6

Signed-off-by: Pratik Raj <rajpratik71@gmail.com>
2021-07-02 01:02:49 +05:30

45 lines
1.2 KiB
Docker

#
# Dockerfile for fteproxy
#
FROM alpine
MAINTAINER kev <norelpy@easypi.pro>
RUN set -xe \
&& apk add -U build-base \
gmp \
gmp-dev \
libstdc++ \
python \
python-dev \
py-pip \
&& pip install --no-cache-dir fteproxy \
&& apk del build-base \
gmp-dev \
python-dev \
&& rm -rf /root/.cache /var/cache/apk/*
ENV MODE server
ENV UPSTREAM_FORMAT manual-http-request
ENV DOWNSTREAM_FORMAT manual-http-response
ENV CLIENT_IP 127.0.0.1
ENV CLIENT_PORT 8079
ENV SERVER_IP 127.0.0.1
ENV SERVER_PORT 8080
ENV PROXY_IP 127.0.0.1
ENV PROXY_PORT 8081
ENV RELEASE 20131224
ENV KEY FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF00000000000000000000000000000000
CMD fteproxy --mode $MODE \
--upstream-format $UPSTREAM_FORMAT \
--downstream-format $DOWNSTREAM_FORMAT \
--client_ip $CLIENT_IP \
--client_port $CLIENT_PORT \
--server_ip $SERVER_IP \
--server_port $SERVER_PORT \
--proxy_ip $PROXY_IP \
--proxy_port $PROXY_PORT \
--release $RELEASE \
--key $KEY