summaryrefslogtreecommitdiff
path: root/Dockerfile
diff options
context:
space:
mode:
authorZaoqi <zaomir@outlook.com>2019-12-17 21:34:21 +0800
committersfan5 <sfan5@live.de>2019-12-17 14:34:21 +0100
commit39a1e6660ecfa5a102b00ca305ebf929821f7214 (patch)
treeb90a164b3fb50579799ebcd3791423984c255dbc /Dockerfile
parentdb7e59f4725a9516314ea0148d1bcaf250280e32 (diff)
downloadminetest-39a1e6660ecfa5a102b00ca305ebf929821f7214.tar.gz
minetest-39a1e6660ecfa5a102b00ca305ebf929821f7214.tar.bz2
minetest-39a1e6660ecfa5a102b00ca305ebf929821f7214.zip
Dockerfile: correct `apt clean` + git clone --depth 1 + remove .git (#8697)
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile11
1 files changed, 6 insertions, 5 deletions
diff --git a/Dockerfile b/Dockerfile
index 27734119e..c465be14a 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -3,9 +3,7 @@ FROM debian:stretch
USER root
RUN apt-get update -y && \
apt-get -y install build-essential libirrlicht-dev cmake libbz2-dev libpng-dev libjpeg-dev \
- libsqlite3-dev libcurl4-gnutls-dev zlib1g-dev libgmp-dev libjsoncpp-dev git && \
- apt-get clean && rm -rf /var/cache/apt/archives/* && \
- rm -rf /var/lib/apt/lists/*
+ libsqlite3-dev libcurl4-gnutls-dev zlib1g-dev libgmp-dev libjsoncpp-dev git
COPY . /usr/src/minetest
@@ -16,7 +14,8 @@ RUN mkdir -p /usr/src/minetest/cmakebuild && cd /usr/src/minetest/cmakebuild &&
-DENABLE_SYSTEM_JSONCPP=1 \
.. && \
make -j2 && \
- rm -Rf ../games/minetest_game && git clone https://github.com/minetest/minetest_game ../games/minetest_game && \
+ rm -Rf ../games/minetest_game && git clone --depth 1 https://github.com/minetest/minetest_game ../games/minetest_game && \
+ rm -Rf ../games/minetest_game/.git
make install
FROM debian:stretch
@@ -25,7 +24,9 @@ USER root
RUN groupadd minetest && useradd -m -g minetest -d /var/lib/minetest minetest && \
apt-get update -y && \
apt-get -y install libcurl3-gnutls libjsoncpp1 liblua5.1-0 libluajit-5.1-2 libpq5 libsqlite3-0 \
- libstdc++6 zlib1g libc6
+ libstdc++6 zlib1g libc6 && \
+ apt-get clean && rm -rf /var/cache/apt/archives/* && \
+ rm -rf /var/lib/apt/lists/*
WORKDIR /var/lib/minetest