diff --git a/packaging/docker/freelan/Dockerfile b/packaging/docker/freelan/Dockerfile index d6640b9a..96b4f123 100644 --- a/packaging/docker/freelan/Dockerfile +++ b/packaging/docker/freelan/Dockerfile @@ -1,29 +1,20 @@ FROM debian:stretch -# Update package list -RUN apt-get update - -# Install dependencies ENV DEPENDENCIES libssl1.1 libboost-system1.62.0 libboost-thread1.62.0 libboost-filesystem1.62.0 libboost-date-time1.62.0 libboost-program-options1.62.0 libboost-iostreams1.62.0 libcurl4-openssl-dev libminiupnpc10 ENV BUILD_DEPENDENCIES g++ git scons libssl-dev libboost-system-dev libboost-thread-dev libboost-filesystem-dev libboost-date-time-dev libboost-program-options-dev libboost-iostreams-dev libminiupnpc-dev - -RUN apt-get install -y $DEPENDENCIES $BUILD_DEPENDENCIES -RUN apt-get clean - -# Get FreeLAN sources ENV FREELAN_BRANCH master - -RUN git clone https://github.com/freelan-developers/freelan.git -RUN cd freelan && git checkout $FREELAN_BRANCH - -# Compile FreeLAN ENV CXX=g++ -RUN cd freelan && scons install prefix=/usr/ -# Remove sources and dependencies -RUN rm -r freelan -RUN apt-get autoremove -y --purge $BUILD_DEPENDENCIES -RUN apt-get clean +# Install dependencies +RUN apt-get update && \ + apt-get install -y $DEPENDENCIES $BUILD_DEPENDENCIES && \ + rm -rf /var/lib/apt/lists/* + +# Get FreeLAN sources and compile it +RUN git clone -b $FREELAN_BRANCH --depth=50 https://github.com/freelan-developers/freelan.git && \ + cd freelan && \ + scons --mode=release install prefix=/usr/ -j2 && \ + cd .. && rm -rf freelan # Profit ! EXPOSE 12000/udp