From 1bad0e81ccf718337b17a27e6bd8ec6ddabc2e1d Mon Sep 17 00:00:00 2001 From: Cory Sanin Date: Sat, 29 Aug 2020 20:17:04 -0500 Subject: Optimize develop Dockerfile and add Dockerfile for v0.3.0 Reduced the image size by about 20MB --- develop/cli/Dockerfile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'develop') diff --git a/develop/cli/Dockerfile b/develop/cli/Dockerfile index 08961e7..0eddaf5 100644 --- a/develop/cli/Dockerfile +++ b/develop/cli/Dockerfile @@ -3,6 +3,7 @@ FROM ubuntu:20.04 AS build-env ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update \ && apt-get install --no-install-recommends -y git cmake pkg-config ninja-build clang-10 duktape-dev libsdl2-dev libspeexdsp-dev libjansson-dev libcurl4-openssl-dev libcrypto++-dev libfontconfig1-dev libfreetype6-dev libpng-dev libzip-dev libssl-dev libicu-dev \ + && rm -rf /var/lib/apt/lists/* \ && ln -s /usr/bin/clang-10 /usr/bin/clang \ && ln -s /usr/bin/clang++-10 /usr/bin/clang++ @@ -16,13 +17,12 @@ RUN git -c http.sslVerify=false clone --depth 1 -b $OPENRCT2_REF https://github. # Build runtime image FROM ubuntu:20.04 -RUN apt-get update -RUN apt-get -y upgrade -RUN apt-get install --no-install-recommends -y rsync ca-certificates libduktape205 libjansson4 libpng16-16 libzip5 libcurl4 libfreetype6 libfontconfig1 libicu66 - # Install OpenRCT2 COPY --from=build-env /openrct2-install /openrct2-install -RUN rsync -a /openrct2-install/* / \ +RUN apt-get update \ + && apt-get install --no-install-recommends -y rsync ca-certificates libduktape205 libjansson4 libpng16-16 libzip5 libcurl4 libfreetype6 libfontconfig1 libicu66 \ + && rm -rf /var/lib/apt/lists/* \ + && rsync -a /openrct2-install/* / \ && rm -rf /openrct2-install \ && openrct2-cli --version -- cgit v1.2.3 From 65477edecbd5a9c82175499f888a0e7f8c4eeb4b Mon Sep 17 00:00:00 2001 From: Cory Sanin Date: Sun, 30 Aug 2020 04:08:32 -0500 Subject: Remove dev static library Saves another 35MB --- 0.3.0/cli/Dockerfile | 5 +++-- develop/cli/Dockerfile | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) (limited to 'develop') diff --git a/0.3.0/cli/Dockerfile b/0.3.0/cli/Dockerfile index 4588df6..621c11d 100644 --- a/0.3.0/cli/Dockerfile +++ b/0.3.0/cli/Dockerfile @@ -12,8 +12,9 @@ WORKDIR /openrct2 RUN git -c http.sslVerify=false clone --depth 1 -b $OPENRCT2_REF https://github.com/OpenRCT2/OpenRCT2 . \ && mkdir build \ && cd build \ - && cmake .. -G Ninja -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/openrct2-install/usr -DCMAKE_INSTALL_LIBDIR=/openrct2-install/usr/lib \ - && ninja -k0 install + && cmake .. -G Ninja -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/openrct2-install/usr \ + && ninja -k0 install \ + && rm /openrct2-install/usr/lib/libopenrct2.a # Build runtime image FROM ubuntu:20.04 diff --git a/develop/cli/Dockerfile b/develop/cli/Dockerfile index 0eddaf5..d4e0967 100644 --- a/develop/cli/Dockerfile +++ b/develop/cli/Dockerfile @@ -12,8 +12,9 @@ WORKDIR /openrct2 RUN git -c http.sslVerify=false clone --depth 1 -b $OPENRCT2_REF https://github.com/OpenRCT2/OpenRCT2 . \ && mkdir build \ && cd build \ - && cmake .. -G Ninja -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/openrct2-install/usr -DCMAKE_INSTALL_LIBDIR=/openrct2-install/usr/lib \ - && ninja -k0 install + && cmake .. -G Ninja -DCMAKE_BUILD_TYPE=release -DCMAKE_INSTALL_PREFIX=/openrct2-install/usr \ + && ninja -k0 install \ + && rm /openrct2-install/usr/lib/libopenrct2.a # Build runtime image FROM ubuntu:20.04 -- cgit v1.2.3