From 3ff444f775e4a57195e507f807a33d26be525adb Mon Sep 17 00:00:00 2001 From: Cory Petkovsek <632766+tinmanjuggernaut@users.noreply.github.com> Date: Fri, 20 Mar 2020 01:13:06 +0800 Subject: [PATCH 1/3] Optimize mono & dnf downloads --- Dockerfile.android | 16 +++---- Dockerfile.base | 5 +-- Dockerfile.export | 3 +- Dockerfile.ios | 3 +- Dockerfile.javascript | 24 +++++------ Dockerfile.mono | 13 ++---- Dockerfile.mono-glue | 4 +- Dockerfile.msvc | 1 - Dockerfile.osx | 15 ++----- Dockerfile.ubuntu-32 | 11 ++--- Dockerfile.ubuntu-64 | 11 ++--- Dockerfile.windows | 16 ++----- Dockerfile.xcode | 5 +-- build.sh | 98 +++++++++++++++++++++++++++++++------------ 14 files changed, 112 insertions(+), 113 deletions(-) diff --git a/Dockerfile.android b/Dockerfile.android index b7a7256..47a5afe 100644 --- a/Dockerfile.android +++ b/Dockerfile.android @@ -2,12 +2,10 @@ ARG img_version FROM godot-mono:${img_version} ARG mono_version -ARG mono_commit RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ dnf -y install --setopt=install_weak_deps=False \ gcc gcc-c++ java-1.8.0-openjdk-devel ncurses-compat-libs && \ - dnf clean all && \ mkdir sdk && cd sdk && \ curl -LO https://dl.google.com/android/repository/sdk-tools-linux-4333796.zip && \ unzip sdk-tools-linux-4333796.zip && \ @@ -18,23 +16,19 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand ENV ANDROID_HOME=/root/sdk/ ENV ANDROID_NDK_ROOT=/root/sdk/ndk-bundle/ -RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \ - cd /root/mono && \ - if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \ - git submodule update --init && \ - git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \ - export MONO_SOURCE_ROOT=/root/mono && \ +RUN cp -a /root/files/${mono_version} /root && \ + export MONO_SOURCE_ROOT=/root/${mono_version} && \ export make="make -j" && \ - git clone https://github.com/godotengine/godot-mono-builds /root/godot-mono-builds && \ + git clone --progress https://github.com/godotengine/godot-mono-builds /root/godot-mono-builds && \ cd /root/godot-mono-builds && \ git checkout 710b275fbf29ddb03fd5285c51782951a110cdab && \ python3 patch_mono.py && \ python3 android.py configure --target=all-runtime && \ python3 android.py make --target=all-runtime && \ - cd /root/mono && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \ + cd /root/${mono_version} && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \ cd /root/godot-mono-builds && \ python3 bcl.py make --product=android && \ cd /root && \ - rm -rf /root/mono /root/godot-mono-builds + rm -rf /root/${mono_version} /root/godot-mono-builds CMD /bin/bash diff --git a/Dockerfile.base b/Dockerfile.base index 68af61a..d9a5525 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -4,7 +4,6 @@ WORKDIR /root RUN dnf -y upgrade --setopt=install_weak_deps=False && \ dnf -y install --setopt=install_weak_deps=False \ - bash bzip2 curl git make patch pkgconfig python3 scons unzip which xz && \ - dnf clean all + bash bzip2 curl git make patch pkgconfig python3 scons unzip which xz -CMD /bin/true +CMD /bin/bash diff --git a/Dockerfile.export b/Dockerfile.export index e839f15..6add3bb 100644 --- a/Dockerfile.export +++ b/Dockerfile.export @@ -2,7 +2,6 @@ ARG img_version FROM godot-fedora:${img_version} RUN dnf -y install --setopt=install_weak_deps=False \ - xorg-x11-server-Xvfb mesa-dri-drivers libXcursor libXinerama libXrandr libXi alsa-lib pulseaudio-libs java-1.8.0-openjdk-devel && \ - dnf clean all + xorg-x11-server-Xvfb mesa-dri-drivers libXcursor libXinerama libXrandr libXi alsa-lib pulseaudio-libs java-1.8.0-openjdk-devel CMD /bin/bash diff --git a/Dockerfile.ios b/Dockerfile.ios index 44e845e..ec1fccb 100644 --- a/Dockerfile.ios +++ b/Dockerfile.ios @@ -3,8 +3,7 @@ FROM godot-fedora:${img_version} RUN dnf -y install --setopt=install_weak_deps=False \ automake autoconf clang gcc gcc-c++ gcc-objc gcc-objc++ cmake libicu-devel libtool libxml2-devel llvm-devel openssl-devel perl python yasm && \ - dnf clean all && \ - git clone https://github.com/tpoechtrager/cctools-port.git && \ + git clone --progress https://github.com/tpoechtrager/cctools-port.git && \ cd /root/cctools-port && \ git checkout 8239a5211bcf07d6b9d359782e1a889ec1d7cce5 && \ sed -i 's#./autogen.sh#libtoolize -c -i --force\n./autogen.sh#' usage_examples/ios_toolchain/build.sh && \ diff --git a/Dockerfile.javascript b/Dockerfile.javascript index dbe0687..7f291e4 100644 --- a/Dockerfile.javascript +++ b/Dockerfile.javascript @@ -2,36 +2,32 @@ ARG img_version FROM godot-mono:${img_version} ARG mono_version -ARG mono_commit -RUN dnf -y install --setopt=install_weak_deps=False \ +RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \ + dnf -y install --setopt=install_weak_deps=False \ java-openjdk yasm && \ - dnf clean all && \ - git clone https://github.com/emscripten-core/emsdk && \ + git clone --progress https://github.com/emscripten-core/emsdk && \ cd emsdk && \ git checkout a5082b232617c762cb65832429f896c838df2483 && \ ./emsdk install 1.38.47-upstream && \ ./emsdk activate 1.38.47-upstream && \ echo "source /root/emsdk/emsdk_env.sh" >> /root/.bashrc -RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \ - cd /root/mono && \ - if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \ - git submodule update --init && \ - git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \ - git apply -3 /root/files/patches/mono-pr16636-wasm-bugfix-and-update.diff && \ - export MONO_SOURCE_ROOT=/root/mono && \ +RUN cp -a /root/files/${mono_version} /root && \ + cd /root/${mono_version} && \ + patch -p1 < /root/files/patches/mono-pr16636-wasm-bugfix-and-update.diff && \ + export MONO_SOURCE_ROOT=/root/${mono_version} && \ export make="make -j" && \ - git clone https://github.com/godotengine/godot-mono-builds /root/godot-mono-builds && \ + git clone --progress https://github.com/godotengine/godot-mono-builds /root/godot-mono-builds && \ cd /root/godot-mono-builds && \ git checkout 710b275fbf29ddb03fd5285c51782951a110cdab && \ python3 patch_emscripten.py && \ python3 wasm.py configure --target=runtime && \ python3 wasm.py make --target=runtime && \ - cd /root/mono && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \ + cd /root/${mono_version} && git clean -fdx && NOCONFIGURE=1 ./autogen.sh && \ cd /root/godot-mono-builds && \ python3 bcl.py make --product wasm && \ cd /root && \ - rm -rf /root/mono /root/godot-mono-builds + rm -rf /root/${mono_version} /root/godot-mono-builds CMD /bin/bash diff --git a/Dockerfile.mono b/Dockerfile.mono index 25b69da..88c8d81 100644 --- a/Dockerfile.mono +++ b/Dockerfile.mono @@ -2,28 +2,23 @@ ARG img_version FROM godot-fedora:${img_version} ARG mono_version -ARG mono_commit RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ dnf -y install --setopt=install_weak_deps=False \ autoconf automake cmake gcc gcc-c++ gettext libtool perl python && \ - dnf clean all && \ - git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \ - cd /root/mono && \ - if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \ - git submodule update --init && \ - git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \ + cp -a /root/files/${mono_version} /root && \ + cd /root/${mono_version} && \ NOCONFIGURE=1 ./autogen.sh && \ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm && \ make -j && \ make install && \ cd /root && \ + rm -rf /root/${mono_version} && \ cert-sync /etc/pki/tls/certs/ca-bundle.crt && \ rpm -ivh --nodeps \ https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-16.3+xamarinxplat.2019.08.08.00.55-0.xamarin.2.epel8.noarch.rpm \ https://download.mono-project.com/repo/centos8-stable/m/msbuild-libhostfxr/msbuild-libhostfxr-3.0.0.2019.04.16.02.13-0.xamarin.4.epel8.x86_64.rpm \ https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-sdkresolver-16.3+xamarinxplat.2019.08.08.00.55-0.xamarin.2.epel8.noarch.rpm \ - https://download.mono-project.com/repo/centos8-stable/n/nuget/nuget-5.2.0.6090.bin-0.xamarin.1.epel8.noarch.rpm && \ - rm -rf /root/mono + https://download.mono-project.com/repo/centos8-stable/n/nuget/nuget-5.2.0.6090.bin-0.xamarin.1.epel8.noarch.rpm CMD /bin/bash diff --git a/Dockerfile.mono-glue b/Dockerfile.mono-glue index 2e826bb..b425bac 100644 --- a/Dockerfile.mono-glue +++ b/Dockerfile.mono-glue @@ -2,10 +2,8 @@ ARG img_version FROM godot-mono:${img_version} ARG mono_version -ARG mono_commit RUN dnf -y install --setopt=install_weak_deps=False \ - xorg-x11-server-Xvfb libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel mesa-libGL-devel mesa-libGLU-devel mesa-dri-drivers && \ - dnf clean all + xorg-x11-server-Xvfb libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel mesa-libGL-devel mesa-libGLU-devel mesa-dri-drivers CMD /bin/bash diff --git a/Dockerfile.msvc b/Dockerfile.msvc index 8c04114..5ca6f09 100644 --- a/Dockerfile.msvc +++ b/Dockerfile.msvc @@ -5,7 +5,6 @@ ENV WINEDEBUG=-all RUN dnf -y install --setopt=install_weak_deps=False \ wine winetricks xorg-x11-server-Xvfb p7zip-plugins findutils && \ - dnf clean all && \ curl -LO https://github.com/GodotBuilder/godot-builds/releases/download/_tools/angle.7z && \ curl -LO https://www.python.org/ftp/python/3.7.2/python-3.7.2-amd64.exe && \ xvfb-run sh -c "winetricks -q vcrun2017; wineserver -w" ;\ diff --git a/Dockerfile.osx b/Dockerfile.osx index 9f5203b..528a8fb 100644 --- a/Dockerfile.osx +++ b/Dockerfile.osx @@ -2,13 +2,11 @@ ARG img_version FROM godot-mono:${img_version} ARG mono_version -ARG mono_commit RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ dnf -y install --setopt=install_weak_deps=False \ automake autoconf bzip2-devel clang libicu-devel libtool libxml2-devel llvm-devel openssl-devel yasm && \ - dnf clean all && \ - git clone https://github.com/tpoechtrager/osxcross.git && \ + git clone --progress https://github.com/tpoechtrager/osxcross.git && \ cd /root/osxcross && \ git checkout 542acc2ef6c21aeb3f109c03748b1015a71fed63 && \ ln -s /root/files/MacOSX10.14.sdk.tar.xz /root/osxcross/tarballs && \ @@ -17,11 +15,8 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand ENV OSXCROSS_ROOT=/root/osxcross ENV PATH="/root/osxcross/target/bin:${PATH}" -RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \ - cd /root/mono && \ - if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \ - git submodule update --init && \ - git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \ +RUN cp -a /root/files/${mono_version} /root && \ + cd /root/${mono_version} && \ export CMAKE=/root/osxcross/target/bin/x86_64-apple-darwin18-cmake && \ NOCONFIGURE=1 ./autogen.sh && \ ./configure --prefix=/root/dependencies/mono \ @@ -46,8 +41,6 @@ RUN git clone https://github.com/mono/mono --branch ${mono_version} --single-bra mkdir -p /root/dependencies/mono/etc && \ cp -rvp /etc/mono /root/dependencies/mono/etc/ && \ cp /root/files/mono-config-macosx /root/dependencies/mono/etc/mono/config && \ - rm -rf /root/mono - -ENV MONO64_PREFIX=/root/dependencies/mono + rm -rf /root/${mono_version} CMD /bin/bash diff --git a/Dockerfile.ubuntu-32 b/Dockerfile.ubuntu-32 index bf6b120..d5870a6 100644 --- a/Dockerfile.ubuntu-32 +++ b/Dockerfile.ubuntu-32 @@ -1,7 +1,6 @@ FROM i386/ubuntu:trusty ARG mono_version -ARG mono_commit RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ apt-get update && \ @@ -21,19 +20,15 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \ ln -sf /usr/bin/g++-8 /usr/bin/g++ -RUN cd /root && \ - git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \ - cd /root/mono && \ - if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \ - git submodule update --init && \ - git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \ +RUN cp -a /root/files/${mono_version} /root && \ + cd /root/${mono_version} && \ NOCONFIGURE=1 ./autogen.sh && \ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm --host=i386-linux-gnu && \ make -j && \ make install && \ cd /root && \ + rm -rf /root/${mono_version} && \ cert-sync /etc/ssl/certs/ca-certificates.crt && \ - rm -rf /root/mono && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_i386.deb && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \ diff --git a/Dockerfile.ubuntu-64 b/Dockerfile.ubuntu-64 index 73f1638..087fee1 100644 --- a/Dockerfile.ubuntu-64 +++ b/Dockerfile.ubuntu-64 @@ -1,7 +1,6 @@ FROM ubuntu:trusty ARG mono_version -ARG mono_commit RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ apt-get update && \ @@ -21,19 +20,15 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \ ln -sf /usr/bin/g++-8 /usr/bin/g++ -RUN cd /root && \ - git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \ - cd /root/mono && \ - if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \ - git submodule update --init && \ - git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \ +RUN cp -a /root/files/${mono_version} /root && \ + cd /root/${mono_version} && \ NOCONFIGURE=1 ./autogen.sh && \ ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var/lib/mono --disable-boehm --host=x86_64-linux-gnu && \ make -j && \ make install && \ cd /root && \ + rm -rf /root/${mono_version} && \ cert-sync /etc/ssl/certs/ca-certificates.crt && \ - rm -rf /root/mono && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_amd64.deb && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \ diff --git a/Dockerfile.windows b/Dockerfile.windows index 91f0824..f41028c 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -2,18 +2,13 @@ ARG img_version FROM godot-mono:${img_version} ARG mono_version -ARG mono_commit RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ dnf -y install --setopt=install_weak_deps=False \ mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static yasm wine && \ - dnf clean all && \ - git clone https://github.com/mono/mono --branch ${mono_version} --single-branch && \ - cd /root/mono && \ - if [ ! -z "${mono_commit}" ]; then git checkout ${mono_commit}; fi && \ - git submodule update --init && \ - git apply -3 /root/files/patches/mono-unity-Clear-TLS-instead-of-aborting.patch && \ - git apply -3 /root/files/patches/wine-mono.patch && \ + cp -a /root/files/${mono_version} /root && \ + cd /root/${mono_version} && \ + patch -p1 < /root/files/patches/wine-mono.patch && \ export WINE_BITS=64 && \ bash /root/files/mono-build-win32.sh --prefix=/root/dependencies/mono-64 --host=x86_64-w64-mingw32 && \ git clean -fdx && \ @@ -25,15 +20,12 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand export WINE_BITS=32 && \ bash /root/files/mono-build-win32.sh --prefix=/root/dependencies/mono-32 --host=i686-w64-mingw32 && \ cd /root && \ + rm -rf /root/${mono_version} && \ cp /root/dependencies/mono-32/bin/libMonoPosixHelper.dll /root/dependencies/mono-32/bin/MonoPosixHelper.dll && \ rm -f /root/dependencies/mono-32/bin/mono /root/dependencies/mono-32/bin/mono-sgen && \ ln -s /usr/bin/mono /root/dependencies/mono-32/bin/mono && \ ln -s /usr/bin/mono-sgen /root/dependencies/mono-32/bin/mono-sgen && \ cp -rvp /etc/mono /root/dependencies/mono-32/etc && \ - rm -rf /root/mono && \ dnf -y remove wine -ENV MONO32_PREFIX=/root/dependencies/mono-32 -ENV MONO64_PREFIX=/root/dependencies/mono-64 - CMD /bin/bash diff --git a/Dockerfile.xcode b/Dockerfile.xcode index fb56827..388fc6a 100644 --- a/Dockerfile.xcode +++ b/Dockerfile.xcode @@ -2,14 +2,13 @@ FROM godot-fedora:${img_version} RUN dnf -y install --setopt=install_weak_deps=False \ autoconf automake libtool clang cmake fuse fuse-devel libxml2-devel libicu-devel compat-openssl10-devel bzip2-devel kmod cpio && \ - dnf clean all && \ - git clone https://github.com/mackyle/xar.git && \ + git clone --progress https://github.com/mackyle/xar.git && \ cd xar/xar && \ git checkout 66d451dab1ef859dd0c83995f2379335d35e53c9 && \ ./autogen.sh --prefix=/usr && \ make -j && make install && \ cd /root && \ - git clone https://github.com/NiklasRosenstein/pbzx && \ + git clone --progress https://github.com/NiklasRosenstein/pbzx && \ cd pbzx && \ git checkout 2a4d7c3300c826d918def713a24d25c237c8ed53 && \ clang -O3 -llzma -lxar -I /usr/local/include pbzx.c -o pbzx diff --git a/build.sh b/build.sh index 53c6a99..00d1afb 100755 --- a/build.sh +++ b/build.sh @@ -1,54 +1,101 @@ #!/bin/bash - set -e -podman=podman -if ! which $podman; then - podman=docker +podman=`which podman` +if [ -z $podman ]; then + podman=`which docker` fi -if ! which $podman; then +if [ -z $podman ]; then echo "Either podman or docker need to be in PATH for this script to work." exit 1 fi -if [ -z "$1" ]; then - echo "usage: $0 [ ]" +if [ -z "$1" -o -z "$2" ]; then + echo "Usage: $0 [ ]" echo echo "Examples: $0 3.1 mono-5.18.1.3" - echo " $0 master mono-6.6.0.160 2019-08 bef1e6335812d32f8eab648c0228fc624b9f8357" + echo " $0 master mono-6.6.0.160 2019-08 bef1e6335812d32f8eab648c0228fc624b9f8357" + echo + echo "godot branch:" + echo "mono version:" + echo " These are combined to form the docker image tag, e.g. 'master-mono-6.6.0.160'." + echo " Git will then clone the branch/tag that matches the mono version." + echo + echo "mono branch:" + echo " If specified, git will clone this mono branch/tag instead. Requires specifying a commit." echo + echo "mono commit:" + echo " If specified, git will check out this commit after cloning." + echo exit 1 fi godot_branch=$1 mono_version=$2 img_version=$godot_branch-$mono_version +files_root=$(pwd)/files mono_commit= +mono_commit_str= + +# If optional Mono git branch and commit hash were passed, use them. if [ ! -z "$3" -a ! -z "$4" ]; then - # Optional Mono git branch and commit hash were passed, - # use that for the git clones. mono_version=$3 mono_commit=$4 + mono_commit_str="-${mono_commit:0:6}" +fi + +# If mono branch does not start with mono-, prepend it to the folder name. +if [ ${mono_version:0:5} != "mono-" ]; then + mono_root="${files_root}/mono-${mono_version}${mono_commit_str}" +else + mono_root="${files_root}/${mono_version}${mono_commit_str}" +fi + +# Confirm settings +echo "Docker image tag: ${img_version}" +echo "Mono branch: ${mono_version}" +if [ ! -z "$mono_commit" ]; then + echo "Mono commit: ${mono_commit}" fi -echo "Building images with version: ${img_version}" -echo "Mono version used: ${mono_version} ${mono_commit}" +if [ -e ${mono_root} ]; then + mono_exists="(exists)" +fi +echo "Mono source folder: ${mono_root} ${mono_exists}" echo while true; do - read -p "Is this correct? [y/n] " yn - case $yn in - [Yy]* ) break;; - [Nn]* ) exit 1;; - * ) echo "Please answer yes or no.";; - esac + read -p "Is this correct? [y/n] " yn + case $yn in + [Yy]* ) break;; + [Nn]* ) exit 1;; + * ) echo "Please answer yes or no.";; + esac done mkdir -p logs +# Check out and patch Mono version +if [ ! -e ${mono_root} ]; then + if [ ! -z "${mono_commit}" ]; then + # If a commit is specified, get the full history + git clone -b ${mono_version} --single-branch --progress https://github.com/mono/mono ${mono_root} + pushd ${mono_root} + git checkout ${mono_commit} + else + # Otherwise, get a shallow repo + git clone -b ${mono_version} --single-branch --progress --depth 1 https://github.com/mono/mono ${mono_root} + pushd ${mono_root} + fi + # Download all submodules, up to 6 at a time + git submodule update --init --recursive --recommend-shallow -j 6 --progress + patch -p1 < ${files_root}/patches/mono-unity-Clear-TLS-instead-of-aborting.patch + popd +fi + export podman_build="$podman build --build-arg img_version=${img_version}" -export podman_build_mono="$podman_build --build-arg mono_version=${mono_version} --build-arg mono_commit=${mono_commit} -v $(pwd)/files:/root/files" +export podman_build_mono="$podman_build --build-arg mono_version=${mono_version} -v ${files_root}:/root/files" -$podman build -t godot-fedora:${img_version} -f Dockerfile.base . 2>&1 | tee logs/base.log +$podman build -v ${files_root}:/root/files -t godot-fedora:${img_version} -f Dockerfile.base . 2>&1 | tee logs/base.log $podman_build -t godot-export:${img_version} -f Dockerfile.export . 2>&1 | tee logs/export.log $podman_build_mono -t godot-mono:${img_version} -f Dockerfile.mono . 2>&1 | tee logs/mono.log @@ -56,10 +103,8 @@ $podman_build_mono -t godot-mono-glue:${img_version} -f Dockerfile.mono-glue . 2 $podman_build_mono -t godot-windows:${img_version} -f Dockerfile.windows --ulimit nofile=65536 . 2>&1 | tee logs/windows.log $podman_build_mono -t godot-ubuntu-64:${img_version} -f Dockerfile.ubuntu-64 . 2>&1 | tee logs/ubuntu-64.log $podman_build_mono -t godot-ubuntu-32:${img_version} -f Dockerfile.ubuntu-32 . 2>&1 | tee logs/ubuntu-32.log -$podman_build_mono -t godot-android:${img_version} -f Dockerfile.android . 2>&1 | tee logs/android.log $podman_build_mono -t godot-javascript:${img_version} -f Dockerfile.javascript . 2>&1 | tee logs/javascript.log - -$podman_build -t godot-xcode-packer:${img_version} -f Dockerfile.xcode -v $(pwd)/files:/root/files . 2>&1 | tee logs/xcode.log +$podman_build_mono -t godot-android:${img_version} -f Dockerfile.android . 2>&1 | tee logs/android.log if [ ! -e files/MacOSX10.14.sdk.tar.xz ] || [ ! -e files/iPhoneOS12.4.sdk.tar.xz ] || [ ! -e files/iPhoneSimulator12.4.sdk.tar.xz ]; then if [ ! -e files/Xcode_10.3.xip ]; then @@ -68,10 +113,11 @@ if [ ! -e files/MacOSX10.14.sdk.tar.xz ] || [ ! -e files/iPhoneOS12.4.sdk.tar.xz fi echo "Building OSX and iOS SDK packages. This will take a while" - $podman run -it --rm -v $(pwd)/files:/root/files godot-xcode-packer:${img_version} 2>&1 | tee logs/xcode_packer.log + $podman_build -t godot-xcode-packer:${img_version} -f Dockerfile.xcode -v ${files_root}:/root/files . 2>&1 | tee logs/xcode.log + $podman run -it --rm -v ${files_root}/files:/root/files godot-xcode-packer:${img_version} 2>&1 | tee logs/xcode_packer.log fi -$podman_build -t godot-ios:${img_version} -f Dockerfile.ios -v $(pwd)/files:/root/files . 2>&1 | tee logs/ios.log +$podman_build -t godot-ios:${img_version} -f Dockerfile.ios -v ${files_root}:/root/files . 2>&1 | tee logs/ios.log $podman_build_mono -t godot-osx:${img_version} -f Dockerfile.osx . 2>&1 | tee logs/osx.log if [ ! -e files/msvc2017.tar ]; then @@ -86,4 +132,4 @@ if [ ! -e files/msvc2017.tar ]; then exit 1 fi -$podman_build -t godot-msvc:${img_version} -f Dockerfile.msvc -v $(pwd)/files:/root/files . 2>&1 | tee logs/msvc.log +$podman_build -t godot-msvc:${img_version} -f Dockerfile.msvc -v ${files_root}:/root/files . 2>&1 | tee logs/msvc.log From 5914b9f752cf12242ed75394339e32656139cb89 Mon Sep 17 00:00:00 2001 From: Cory Petkovsek <632766+tinmanjuggernaut@users.noreply.github.com> Date: Wed, 25 Mar 2020 16:52:00 +0800 Subject: [PATCH 2/3] Move Ubuntu to gcc 9.2.1 --- Dockerfile.ubuntu-32 | 10 +++++----- Dockerfile.ubuntu-64 | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/Dockerfile.ubuntu-32 b/Dockerfile.ubuntu-32 index d5870a6..f59f161 100644 --- a/Dockerfile.ubuntu-32 +++ b/Dockerfile.ubuntu-32 @@ -13,12 +13,12 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand apt-get -y update && \ apt-get -y install --no-install-recommends \ autoconf automake bzip2 cmake curl gettext git libtool make perl scons xz-utils \ - gcc-8 g++-8 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \ + gcc-9 g++-9 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \ libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxinerama-dev yasm && \ - ln -sf /usr/bin/gcc-ranlib-8 /usr/bin/gcc-ranlib && \ - ln -sf /usr/bin/gcc-ar-8 /usr/bin/gcc-ar && \ - ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \ - ln -sf /usr/bin/g++-8 /usr/bin/g++ + ln -sf /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib && \ + ln -sf /usr/bin/gcc-ar-9 /usr/bin/gcc-ar && \ + ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \ + ln -sf /usr/bin/g++-9 /usr/bin/g++ RUN cp -a /root/files/${mono_version} /root && \ cd /root/${mono_version} && \ diff --git a/Dockerfile.ubuntu-64 b/Dockerfile.ubuntu-64 index 087fee1..0c8d45b 100644 --- a/Dockerfile.ubuntu-64 +++ b/Dockerfile.ubuntu-64 @@ -13,12 +13,12 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand apt-get -y update && \ apt-get -y install --no-install-recommends \ autoconf automake bzip2 cmake curl gettext git libtool make perl scons xz-utils \ - gcc-8 g++-8 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \ + gcc-9 g++-9 libudev-dev libx11-dev libxcursor-dev libxrandr-dev libasound2-dev libpulse-dev \ libgl1-mesa-dev libglu1-mesa-dev libxi-dev libxinerama-dev yasm && \ - ln -sf /usr/bin/gcc-ranlib-8 /usr/bin/gcc-ranlib && \ - ln -sf /usr/bin/gcc-ar-8 /usr/bin/gcc-ar && \ - ln -sf /usr/bin/gcc-8 /usr/bin/gcc && \ - ln -sf /usr/bin/g++-8 /usr/bin/g++ + ln -sf /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib && \ + ln -sf /usr/bin/gcc-ar-9 /usr/bin/gcc-ar && \ + ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \ + ln -sf /usr/bin/g++-9 /usr/bin/g++ RUN cp -a /root/files/${mono_version} /root && \ cd /root/${mono_version} && \ From e6b220d6a162feb54c3a81c06955e1722ffa522c Mon Sep 17 00:00:00 2001 From: Cory Petkovsek <632766+tinmanjuggernaut@users.noreply.github.com> Date: Fri, 20 Mar 2020 01:55:21 +0800 Subject: [PATCH 3/3] Hadolint recommendations --- Dockerfile.android | 6 ++++-- Dockerfile.base | 2 +- Dockerfile.export | 2 +- Dockerfile.ios | 2 +- Dockerfile.javascript | 2 +- Dockerfile.mono | 4 ++-- Dockerfile.mono-glue | 2 +- Dockerfile.msvc | 2 +- Dockerfile.osx | 4 ++-- Dockerfile.ubuntu-32 | 18 ++++++++++-------- Dockerfile.ubuntu-64 | 18 ++++++++++-------- Dockerfile.windows | 4 ++-- Dockerfile.xcode | 9 ++++++--- 13 files changed, 42 insertions(+), 33 deletions(-) diff --git a/Dockerfile.android b/Dockerfile.android index 47a5afe..1f618e0 100644 --- a/Dockerfile.android +++ b/Dockerfile.android @@ -3,7 +3,9 @@ FROM godot-mono:${img_version} ARG mono_version -RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \ dnf -y install --setopt=install_weak_deps=False \ gcc gcc-c++ java-1.8.0-openjdk-devel ncurses-compat-libs && \ mkdir sdk && cd sdk && \ @@ -31,4 +33,4 @@ RUN cp -a /root/files/${mono_version} /root && \ cd /root && \ rm -rf /root/${mono_version} /root/godot-mono-builds -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.base b/Dockerfile.base index d9a5525..f1ab638 100644 --- a/Dockerfile.base +++ b/Dockerfile.base @@ -6,4 +6,4 @@ RUN dnf -y upgrade --setopt=install_weak_deps=False && \ dnf -y install --setopt=install_weak_deps=False \ bash bzip2 curl git make patch pkgconfig python3 scons unzip which xz -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.export b/Dockerfile.export index 6add3bb..4974584 100644 --- a/Dockerfile.export +++ b/Dockerfile.export @@ -4,4 +4,4 @@ FROM godot-fedora:${img_version} RUN dnf -y install --setopt=install_weak_deps=False \ xorg-x11-server-Xvfb mesa-dri-drivers libXcursor libXinerama libXrandr libXi alsa-lib pulseaudio-libs java-1.8.0-openjdk-devel -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.ios b/Dockerfile.ios index ec1fccb..c3b266c 100644 --- a/Dockerfile.ios +++ b/Dockerfile.ios @@ -21,4 +21,4 @@ RUN dnf -y install --setopt=install_weak_deps=False \ ENV OSXCROSS_IOS=not_nothing -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.javascript b/Dockerfile.javascript index 7f291e4..16676c4 100644 --- a/Dockerfile.javascript +++ b/Dockerfile.javascript @@ -30,4 +30,4 @@ RUN cp -a /root/files/${mono_version} /root && \ cd /root && \ rm -rf /root/${mono_version} /root/godot-mono-builds -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.mono b/Dockerfile.mono index 88c8d81..621fb48 100644 --- a/Dockerfile.mono +++ b/Dockerfile.mono @@ -3,7 +3,7 @@ FROM godot-fedora:${img_version} ARG mono_version -RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ +RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \ dnf -y install --setopt=install_weak_deps=False \ autoconf automake cmake gcc gcc-c++ gettext libtool perl python && \ cp -a /root/files/${mono_version} /root && \ @@ -21,4 +21,4 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand https://download.mono-project.com/repo/centos8-stable/m/msbuild/msbuild-sdkresolver-16.3+xamarinxplat.2019.08.08.00.55-0.xamarin.2.epel8.noarch.rpm \ https://download.mono-project.com/repo/centos8-stable/n/nuget/nuget-5.2.0.6090.bin-0.xamarin.1.epel8.noarch.rpm -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.mono-glue b/Dockerfile.mono-glue index b425bac..61c3cec 100644 --- a/Dockerfile.mono-glue +++ b/Dockerfile.mono-glue @@ -6,4 +6,4 @@ ARG mono_version RUN dnf -y install --setopt=install_weak_deps=False \ xorg-x11-server-Xvfb libX11-devel libXcursor-devel libXrandr-devel libXinerama-devel libXi-devel alsa-lib-devel pulseaudio-libs-devel libudev-devel mesa-libGL-devel mesa-libGLU-devel mesa-dri-drivers -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.msvc b/Dockerfile.msvc index 5ca6f09..3c23708 100644 --- a/Dockerfile.msvc +++ b/Dockerfile.msvc @@ -26,4 +26,4 @@ RUN dnf -y install --setopt=install_weak_deps=False \ rm -rf /root/.wine/drive_c/users/root/Temp/* && \ rm -rf /root/.cache -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.osx b/Dockerfile.osx index 528a8fb..27234d8 100644 --- a/Dockerfile.osx +++ b/Dockerfile.osx @@ -3,7 +3,7 @@ FROM godot-mono:${img_version} ARG mono_version -RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ +RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \ dnf -y install --setopt=install_weak_deps=False \ automake autoconf bzip2-devel clang libicu-devel libtool libxml2-devel llvm-devel openssl-devel yasm && \ git clone --progress https://github.com/tpoechtrager/osxcross.git && \ @@ -43,4 +43,4 @@ RUN cp -a /root/files/${mono_version} /root && \ cp /root/files/mono-config-macosx /root/dependencies/mono/etc/mono/config && \ rm -rf /root/${mono_version} -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.ubuntu-32 b/Dockerfile.ubuntu-32 index f59f161..b9369e8 100644 --- a/Dockerfile.ubuntu-32 +++ b/Dockerfile.ubuntu-32 @@ -2,9 +2,11 @@ FROM i386/ubuntu:trusty ARG mono_version -RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \ apt-get update && \ - apt-get -y install wget && \ + apt-get -y install wget --no-install-recommends && \ cd /root && \ wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | apt-key add - && \ wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8E51A6D660CD88D67D65221D90BD7EACED8E640A' | apt-key add - && \ @@ -18,7 +20,9 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand ln -sf /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib && \ ln -sf /usr/bin/gcc-ar-9 /usr/bin/gcc-ar && \ ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \ - ln -sf /usr/bin/g++-9 /usr/bin/g++ + ln -sf /usr/bin/g++-9 /usr/bin/g++ && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/ RUN cp -a /root/files/${mono_version} /root && \ cd /root/${mono_version} && \ @@ -33,11 +37,9 @@ RUN cp -a /root/files/${mono_version} /root && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_i386.deb && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \ - dpkg -i --force-all *.deb && \ + dpkg -i --force-all ./*.deb && \ sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \ ln -s /usr/bin/mono /usr/bin/cli && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/ && \ - rm *.deb + rm -f ./*.deb -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.ubuntu-64 b/Dockerfile.ubuntu-64 index 0c8d45b..a96bde2 100644 --- a/Dockerfile.ubuntu-64 +++ b/Dockerfile.ubuntu-64 @@ -2,9 +2,11 @@ FROM ubuntu:trusty ARG mono_version -RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + +RUN if [ -z "${mono_version}" ]; then printf "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \ apt-get update && \ - apt-get -y install wget && \ + apt-get -y install wget --no-install-recommends && \ cd /root && \ wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x1E9377A2BA9EF27F' | apt-key add - && \ wget -O- 'https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x8E51A6D660CD88D67D65221D90BD7EACED8E640A' | apt-key add - && \ @@ -18,7 +20,9 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand ln -sf /usr/bin/gcc-ranlib-9 /usr/bin/gcc-ranlib && \ ln -sf /usr/bin/gcc-ar-9 /usr/bin/gcc-ar && \ ln -sf /usr/bin/gcc-9 /usr/bin/gcc && \ - ln -sf /usr/bin/g++-9 /usr/bin/g++ + ln -sf /usr/bin/g++-9 /usr/bin/g++ && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/ RUN cp -a /root/files/${mono_version} /root && \ cd /root/${mono_version} && \ @@ -33,11 +37,9 @@ RUN cp -a /root/files/${mono_version} /root && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/c/core-setup/msbuild-libhostfxr_3.0.0.2019.04.16.02.13-0xamarin3+ubuntu1604b1_amd64.deb && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/m/msbuild/msbuild-sdkresolver_16.3+xamarinxplat.2019.08.08.00.55-0xamarin2+ubuntu1604b1_all.deb && \ wget https://download.mono-project.com/repo/ubuntu/pool/main/n/nuget/nuget_5.2.0.6090.bin-0xamarin1+ubuntu1604b1_all.deb && \ - dpkg -i --force-all *.deb && \ + dpkg -i --force-all ./*.deb && \ sed -i '/Depends.*mono/d' /var/lib/dpkg/status && \ ln -s /usr/bin/mono /usr/bin/cli && \ - apt-get clean && \ - rm -rf /var/lib/apt/lists/ && \ - rm *.deb + rm -f ./*.deb -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.windows b/Dockerfile.windows index f41028c..b171191 100644 --- a/Dockerfile.windows +++ b/Dockerfile.windows @@ -3,7 +3,7 @@ FROM godot-mono:${img_version} ARG mono_version -RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mandatory!\n\n"; exit 1; fi && \ +RUN if [ -z "${mono_version}" ]; then "\n\nArgument mono_version is mandatory!\n\n"; exit 1; fi && \ dnf -y install --setopt=install_weak_deps=False \ mingw32-gcc mingw32-gcc-c++ mingw32-winpthreads-static mingw64-gcc mingw64-gcc-c++ mingw64-winpthreads-static yasm wine && \ cp -a /root/files/${mono_version} /root && \ @@ -28,4 +28,4 @@ RUN if [ -z "${mono_version}" ]; then echo -e "\n\nargument mono-version is mand cp -rvp /etc/mono /root/dependencies/mono-32/etc && \ dnf -y remove wine -CMD /bin/bash +CMD ["/bin/bash"] diff --git a/Dockerfile.xcode b/Dockerfile.xcode index 388fc6a..abe5322 100644 --- a/Dockerfile.xcode +++ b/Dockerfile.xcode @@ -1,5 +1,7 @@ FROM godot-fedora:${img_version} +SHELL ["/bin/bash", "-o", "pipefail", "-c"] + RUN dnf -y install --setopt=install_weak_deps=False \ autoconf automake libtool clang cmake fuse fuse-devel libxml2-devel libicu-devel compat-openssl10-devel bzip2-devel kmod cpio && \ git clone --progress https://github.com/mackyle/xar.git && \ @@ -11,9 +13,8 @@ RUN dnf -y install --setopt=install_weak_deps=False \ git clone --progress https://github.com/NiklasRosenstein/pbzx && \ cd pbzx && \ git checkout 2a4d7c3300c826d918def713a24d25c237c8ed53 && \ - clang -O3 -llzma -lxar -I /usr/local/include pbzx.c -o pbzx - -CMD mkdir -p /root/xcode && \ + clang -O3 -llzma -lxar -I /usr/local/include pbzx.c -o pbzx && \ + mkdir -p /root/xcode && \ cd /root/xcode && \ xar -xf /root/files/Xcode_10.3.xip && \ /root/pbzx/pbzx -n Content | cpio -i && \ @@ -40,3 +41,5 @@ CMD mkdir -p /root/xcode && \ cp -r Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1 /tmp/iPhoneOS12.4.sdk/usr/include/c++/ && \ cd /tmp && \ tar -cJf /root/files/iPhoneSimulator12.4.sdk.tar.xz iPhoneOS12.4.sdk + +CMD ["/bin/bash"]