Skip to content

Commit

Permalink
Refactors Dockerfile.
Browse files Browse the repository at this point in the history
  • Loading branch information
s-vincent committed Oct 20, 2018
1 parent 105a4df commit 787f0a4
Showing 1 changed file with 10 additions and 19 deletions.
29 changes: 10 additions & 19 deletions packaging/docker/freelan/Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down

0 comments on commit 787f0a4

Please sign in to comment.