From 112722df78ce1eabefb59ec6cd0ea429e0c6e89b Mon Sep 17 00:00:00 2001 From: Relintai Date: Sat, 20 Apr 2024 20:29:56 +0200 Subject: [PATCH] Use docker instead of podman in the container build script. --- misc/build-containers/Dockerfile.ios | 4 +++- misc/build-containers/Dockerfile.osx | 4 +++- misc/build-containers/build_containers.sh | 29 +++++++++-------------- 3 files changed, 17 insertions(+), 20 deletions(-) diff --git a/misc/build-containers/Dockerfile.ios b/misc/build-containers/Dockerfile.ios index dd7d7cd09..fa6147022 100644 --- a/misc/build-containers/Dockerfile.ios +++ b/misc/build-containers/Dockerfile.ios @@ -1,6 +1,8 @@ ARG img_version FROM pandemonium-osx:${img_version} +COPY files/* /root/files/ + ENV IOS_SDK=17.2 RUN dnf -y install --setopt=install_weak_deps=False \ @@ -30,7 +32,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \ mkdir /root/ioscross/x86_64_sim/usr && \ ln -s /root/ioscross/x86_64_sim/bin /root/ioscross/x86_64_sim/usr/bin && \ cd /root && \ - rm -rf /root/cctools-port + rm -rf /root/cctools-port && rm -rf /root/files ENV OSXCROSS_IOS=not_nothing ENV IOSCROSS_ROOT=/root/ioscross diff --git a/misc/build-containers/Dockerfile.osx b/misc/build-containers/Dockerfile.osx index 27288a9bb..b668ec0ee 100644 --- a/misc/build-containers/Dockerfile.osx +++ b/misc/build-containers/Dockerfile.osx @@ -3,6 +3,8 @@ FROM pandemonium-fedora:${img_version} ENV OSX_SDK=14.2 +COPY files/* /root/files/ + RUN dnf -y install --setopt=install_weak_deps=False \ automake autoconf bzip2-devel cmake gcc gcc-c++ libdispatch libicu-devel libtool \ libxml2-devel openssl-devel uuid-devel yasm && \ @@ -20,7 +22,7 @@ RUN dnf -y install --setopt=install_weak_deps=False \ CLANG_VERSION=16.0.0 ENABLE_CLANG_INSTALL=1 INSTALLPREFIX=/usr ./build_apple_clang.sh && \ ./build.sh && \ ./build_compiler_rt.sh && \ - rm -rf /root/osxcross/build + rm -rf /root/osxcross/build && rm -rf /root/files ENV OSXCROSS_ROOT=/root/osxcross ENV PATH="/root/osxcross/target/bin:${PATH}" diff --git a/misc/build-containers/build_containers.sh b/misc/build-containers/build_containers.sh index 3e3a795f5..4eb5cb686 100755 --- a/misc/build-containers/build_containers.sh +++ b/misc/build-containers/build_containers.sh @@ -1,26 +1,19 @@ #!/bin/bash set -e -podman=`which podman || true` - -if [ -z $podman ]; then - echo "podman needs to be in PATH for this script to work." - exit 1 -fi - files_root=$(pwd)/files img_version=pe mkdir -p logs -# You can add --no-cache as an option to podman_build below to rebuild all containers from scratch -export podman_build="$podman build --build-arg img_version=${img_version} -v ${files_root}:/root/files" +# You can add --no-cache as an option to docker_build below to rebuild all containers from scratch +export docker_build="docker build --build-arg img_version=${img_version} " -$podman build -t pandemonium-fedora:${img_version} -f Dockerfile.base . 2>&1 | tee logs/base.log -$podman_build -t pandemonium-linux:${img_version} -f Dockerfile.linux . 2>&1 | tee logs/linux.log -$podman_build -t pandemonium-windows:${img_version} -f Dockerfile.windows . 2>&1 | tee logs/windows.log -$podman_build -t pandemonium-javascript:${img_version} -f Dockerfile.javascript . 2>&1 | tee logs/javascript.log -$podman_build -t pandemonium-android:${img_version} -f Dockerfile.android . 2>&1 | tee logs/android.log +docker build -t pandemonium-fedora:${img_version} -f Dockerfile.base . 2>&1 | tee logs/base.log +$docker_build -t pandemonium-linux:${img_version} -f Dockerfile.linux . 2>&1 | tee logs/linux.log +$docker_build -t pandemonium-windows:${img_version} -f Dockerfile.windows . 2>&1 | tee logs/windows.log +$docker_build -t pandemonium-javascript:${img_version} -f Dockerfile.javascript . 2>&1 | tee logs/javascript.log +$docker_build -t pandemonium-android:${img_version} -f Dockerfile.android . 2>&1 | tee logs/android.log XCODE_SDK=15.2 OSX_SDK=14.2 @@ -32,10 +25,10 @@ if [ ! -e files/MacOSX${OSX_SDK}.sdk.tar.xz ] || [ ! -e files/iPhoneOS${IOS_SDK} fi echo "Building OSX and iOS SDK packages. This will take a while" - $podman_build -t pandemonium-xcode-packer:${img_version} -f Dockerfile.xcode . 2>&1 | tee logs/xcode.log - $podman run -it --rm -v ${files_root}:/root/files -e XCODE_SDKV="${XCODE_SDK}" -e OSX_SDKV="${OSX_SDK}" -e IOS_SDKV="${IOS_SDK}" pandemonium-xcode-packer:${img_version} 2>&1 | tee logs/xcode_packer.log + $docker_build -t pandemonium-xcode-packer:${img_version} -f Dockerfile.xcode . 2>&1 | tee logs/xcode.log + docker run -it --rm -v ${files_root}:/root/files -e XCODE_SDKV="${XCODE_SDK}" -e OSX_SDKV="${OSX_SDK}" -e IOS_SDKV="${IOS_SDK}" pandemonium-xcode-packer:${img_version} 2>&1 | tee logs/xcode_packer.log fi -$podman_build -t pandemonium-osx:${img_version} -f Dockerfile.osx . 2>&1 | tee logs/osx.log -$podman_build -t pandemonium-ios:${img_version} -f Dockerfile.ios . 2>&1 | tee logs/ios.log +$docker_build -t pandemonium-osx:${img_version} -f Dockerfile.osx . 2>&1 | tee logs/osx.log +$docker_build -t pandemonium-ios:${img_version} -f Dockerfile.ios . 2>&1 | tee logs/ios.log