Created
June 20, 2024 23:12
-
-
Save lunaynx/27b82f26fbabe7355ced33e5ea16d5c5 to your computer and use it in GitHub Desktop.
Revisions
-
lunaynx revised this gist
Jul 22, 2023 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,8 @@ FROM alpine AS base ENV CONF_ARGS="--disable-shared" \ CMAKE_ARGS="-DBUILD_SHARED_LIBS=0" \ CC="clang-15" \ CXX="clang++-15" \ LD="ld.lld" \ LDFLAGS="-no-pie -static -static-libgcc -Wl,--no-dynamic-linker -Wl,-static" RUN apk add --no-cache autoconf automake ca-certificates clang15 cmake eudev-dev gcc git gnupg libtool linux-headers make musl-dev ncurses-static ncurses-terminfo nghttp2-dev nghttp2-static openssl-dev openssl-libs-static pkgconf wget xz zlib-dev zlib-static -
lunaynx revised this gist
Jan 19, 2023 . No changes.There are no files selected for viewing
-
lunaynx revised this gist
Dec 22, 2022 . 1 changed file with 0 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -74,17 +74,8 @@ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libi make install && \ rm -rf /tmp/build FROM base AS libzip WORKDIR /tmp/build/libzip RUN git clone --single-branch --depth 1 https://github.com/nih-at/libzip.git . && \ # force linking to static libs rm /lib/libz.so /usr/lib/libcrypto.so && \ -
lunaynx revised this gist
Dec 22, 2022 . 1 changed file with 53 additions and 26 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,8 @@ ENV CONF_ARGS="--disable-shared" \ CC="clang" \ CXX="clang++" \ LD="ld.lld" \ LDFLAGS="-no-pie -static -static-libgcc -Wl,--no-dynamic-linker -Wl,-static" RUN apk add --no-cache autoconf automake ca-certificates clang15 cmake eudev-dev gcc git gnupg libtool linux-headers make musl-dev ncurses-static ncurses-terminfo nghttp2-dev nghttp2-static openssl-dev openssl-libs-static pkgconf wget xz zlib-dev zlib-static FROM base AS libplist WORKDIR /tmp/build/libplist @@ -38,7 +38,6 @@ FROM base AS libimobiledevice WORKDIR /tmp/build/libimobiledevice COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ COPY --from=libusbmuxd /usr/local/ /usr/local/ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libimobiledevice.git . && \ ./autogen.sh $CONF_ARGS --without-cython && \ make -j$(nproc) && \ @@ -65,7 +64,7 @@ RUN wget https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz && \ FROM base AS libirecovery WORKDIR /tmp/build/libirecovery ENV LDFLAGS="${LDFLAGS} -lncurses" COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ COPY --from=libusb /usr/local/ /usr/local/ COPY --from=readline /usr/local/ /usr/local/ @@ -75,39 +74,67 @@ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libi make install && \ rm -rf /tmp/build #FROM base AS zlib #WORKDIR /tmp/build/zlib #RUN git clone --single-branch --depth 1 https://github.com/madler/zlib.git . && \ # ./configure --static && \ # make -j$(nproc) && \ # make install && \ # rm -rf /tmp/build FROM base AS libzip WORKDIR /tmp/build/libzip #COPY --from=zlib /usr/local/ /usr/local/ RUN git clone --single-branch --depth 1 https://github.com/nih-at/libzip.git . && \ # force linking to static libs rm /lib/libz.so /usr/lib/libcrypto.so && \ cmake . $CMAKE_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS ideviceinstaller WORKDIR /tmp/build/ideviceinstaller COPY --from=libimobiledevice /usr/local/ /usr/local/ COPY --from=libplist /usr/local/ /usr/local/ COPY --from=libusbmuxd /usr/local/ /usr/local/ COPY --from=libzip /usr/local/include/ /usr/local/include/ COPY --from=libzip /usr/local/lib/ /usr/local/lib/ ENV LDFLAGS="${LDFLAGS} -lz" RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/ideviceinstaller.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS curl WORKDIR /tmp/build/curl RUN wget https://curl.se/download/curl-7.86.0.tar.xz && \ tar -xvf curl-7.86.0.tar.xz && \ cd curl-7.86.0 && \ autoreconf -i && \ ./configure $CONF_ARGS --without-brotli --with-openssl && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS idevicerestore WORKDIR /tmp/build/idevicerestore COPY --from=curl /usr/local/include/ /usr/local/include/ COPY --from=curl /usr/local/lib/ /usr/local/lib/ COPY --from=libimobiledevice /usr/local/ /usr/local/ COPY --from=libirecovery /usr/local/ /usr/local/ COPY --from=libzip /usr/local/include/ /usr/local/include/ COPY --from=libzip /usr/local/lib/ /usr/local/lib/ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/idevicerestore.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS output COPY --from=ideviceinstaller /usr/local/ /usr/local/ COPY --from=idevicerestore /usr/local/ /usr/local/ COPY --from=libimobiledevice /usr/local/ /usr/local/ COPY --from=libirecovery /usr/local/ /usr/local/ COPY --from=libplist /usr/local/ /usr/local/ -
lunaynx revised this gist
Dec 19, 2022 . 1 changed file with 23 additions and 53 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,18 +1,11 @@ FROM alpine AS base ENV CONF_ARGS="--disable-shared" \ CMAKE_ARGS="-DBUILD_SHARED_LIBS=0" \ CC="clang" \ CXX="clang++" \ LD="ld.lld" \ LDFLAGS="-no-pie -static -static-libgcc -Wl,-static -Wl,--no-dynamic-linker" RUN apk add --no-cache autoconf automake ca-certificates clang15 cmake curl-dev curl-static eudev-dev gcc git gnupg libtool linux-headers make musl-dev ncurses-static ncurses-terminfo openssl-dev openssl-libs-static pkgconf wget xz FROM base AS libplist WORKDIR /tmp/build/libplist @@ -41,44 +34,17 @@ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libu make install && \ rm -rf /tmp/build FROM base AS libimobiledevice WORKDIR /tmp/build/libimobiledevice COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ COPY --from=libusbmuxd /usr/local/ /usr/local/ #ENV CC="gcc" RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libimobiledevice.git . && \ ./autogen.sh $CONF_ARGS --without-cython && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libusb WORKDIR /tmp/build/libusb RUN git clone --single-branch --depth 1 https://github.com/libusb/libusb.git . && \ @@ -99,7 +65,7 @@ RUN wget https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz && \ FROM base AS libirecovery WORKDIR /tmp/build/libirecovery ENV LDFLAGS="$LDFLAGS -lncurses" COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ COPY --from=libusb /usr/local/ /usr/local/ COPY --from=readline /usr/local/ /usr/local/ @@ -121,24 +87,28 @@ FROM base AS libzip WORKDIR /tmp/build/libzip COPY --from=zlib /usr/local/ /usr/local/ RUN git clone --single-branch --depth 1 https://github.com/nih-at/libzip.git . && \ # force linking to libcrypto.a rm /usr/lib/libcrypto.so && \ cmake . $CMAKE_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build #FROM base AS idevicerestore #WORKDIR /tmp/build/idevicerestore #COPY --from=libimobiledevice /usr/local/ /usr/local/ #COPY --from=libirecovery /usr/local/ /usr/local/ #COPY --from=libzip /usr/local/include/ /usr/local/include/ #COPY --from=libzip /usr/local/lib/ /usr/local/lib/ #RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/idevicerestore.git . && \ # ./autogen.sh $CONF_ARGS && \ # make -j$(nproc) && \ # make install && \ # rm -rf /tmp/build FROM base AS output #COPY --from=idevicerestore /usr/local/ /usr/local/ COPY --from=libimobiledevice /usr/local/ /usr/local/ COPY --from=libirecovery /usr/local/ /usr/local/ COPY --from=libplist /usr/local/ /usr/local/ COPY --from=libusbmuxd /usr/local/ /usr/local/ -
lunaynx revised this gist
Dec 17, 2022 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -141,4 +141,4 @@ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/idev make install && \ rm -rf /tmp/build RUN ldconfig -
lunaynx revised this gist
Dec 17, 2022 . 1 changed file with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -99,7 +99,7 @@ RUN wget https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz && \ FROM base AS libirecovery WORKDIR /tmp/build/libirecovery ENV LDFLAGS="-l:libtinfo.a" COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ COPY --from=libusb /usr/local/ /usr/local/ COPY --from=readline /usr/local/ /usr/local/ @@ -134,7 +134,6 @@ COPY --from=libimobiledevice /usr/local/ /usr/local/ COPY --from=libirecovery /usr/local/ /usr/local/ COPY --from=libzip /usr/local/include/ /usr/local/include/ COPY --from=libzip /usr/local/lib/ /usr/local/lib/ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/idevicerestore.git . && \ apt-get -y remove gcc g++ && \ ./autogen.sh $CONF_ARGS && \ -
lunaynx revised this gist
Dec 17, 2022 . 1 changed file with 27 additions and 11 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -12,7 +12,7 @@ RUN apt-get -y update && \ echo 'deb http://apt.llvm.org/buster/ llvm-toolchain-buster main' > /etc/apt/sources.list.d/llvm.list && \ wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ apt-get -y update && \ apt-get -y install --no-install-recommends autoconf automake clang cmake gcc git libncurses-dev libtool-bin libudev-dev make pkg-config xz-utils FROM base AS libplist WORKDIR /tmp/build/libplist @@ -43,9 +43,9 @@ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libu FROM base AS openssl WORKDIR /tmp/build/openssl RUN wget https://www.openssl.org/source/openssl-1.1.1s.tar.gz && \ tar -xf openssl-1.1.1s.tar.gz && \ cd openssl-1.1.1s && \ ./config no-shared && \ sed -i -r '1s/^/#include <string.h>\n/' test/v3ext.c && \ make && \ @@ -59,9 +59,9 @@ COPY --from=libusbmuxd /usr/local/ /usr/local/ COPY --from=openssl /usr/local/include/ /usr/local/include/ COPY --from=openssl /usr/local/lib/ /usr/local/lib/ ENV CC="gcc" \ LDFLAGS="-ldl -static-libgcc" RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libimobiledevice.git . && \ ./autogen.sh $CONF_ARGS --without-cython && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build @@ -70,10 +70,11 @@ FROM base AS curl WORKDIR /tmp/build/curl COPY --from=openssl /usr/local/include/ /usr/local/include/ COPY --from=openssl /usr/local/lib/ /usr/local/lib/ ENV LDFLAGS="-ldl" RUN wget https://curl.se/download/curl-7.86.0.tar.xz && \ tar -xvf curl-7.86.0.tar.xz && \ cd curl-7.86.0 && \ cmake . $CMAKE_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build @@ -86,10 +87,22 @@ RUN git clone --single-branch --depth 1 https://github.com/libusb/libusb.git . & make install && \ rm -rf /tmp/build FROM base AS readline WORKDIR /tmp/build/readline RUN wget https://ftp.gnu.org/gnu/readline/readline-8.2.tar.gz && \ tar -xvf readline-8.2.tar.gz && \ cd readline-8.2 && \ ./configure $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libirecovery WORKDIR /tmp/build/libirecovery ENV LDFLAGS="-Wl,--allow-multiple-definition -Wl,--no-as-needed -l:libtinfo.a" COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ COPY --from=libusb /usr/local/ /usr/local/ COPY --from=readline /usr/local/ /usr/local/ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libirecovery.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ @@ -99,7 +112,7 @@ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libi FROM base AS zlib WORKDIR /tmp/build/zlib RUN git clone --single-branch --depth 1 https://github.com/madler/zlib.git . && \ ./configure --static && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build @@ -121,9 +134,12 @@ COPY --from=libimobiledevice /usr/local/ /usr/local/ COPY --from=libirecovery /usr/local/ /usr/local/ COPY --from=libzip /usr/local/include/ /usr/local/include/ COPY --from=libzip /usr/local/lib/ /usr/local/lib/ ENV LDFLAGS="-static-libgcc" RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/idevicerestore.git . && \ apt-get -y remove gcc g++ && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build RUN ldconfig -
lunaynx revised this gist
Dec 17, 2022 . 1 changed file with 25 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -6,15 +6,14 @@ ENV CONF_ARGS="--disable-shared" \ LD="ld.lld" \ CFLAGS="-fPIC" \ CXXFLAGS="-fPIC" \ LDFLAGS="-Wl,--allow-multiple-definition -Wl,--no-as-needed" RUN apt-get -y update && \ apt-get -y install --no-install-recommends ca-certificates gnupg wget && \ echo 'deb http://apt.llvm.org/buster/ llvm-toolchain-buster main' > /etc/apt/sources.list.d/llvm.list && \ wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ apt-get -y update && \ apt-get -y install --no-install-recommends autoconf automake clang cmake gcc git libreadline-dev libtool-bin libudev-dev make pkg-config xz-utils FROM base AS libplist WORKDIR /tmp/build/libplist RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libplist.git . && \ @@ -34,31 +33,47 @@ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libi FROM base AS libusbmuxd WORKDIR /tmp/build/libusbmuxd COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ COPY --from=libplist /usr/local/ /usr/local/ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libusbmuxd.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS openssl WORKDIR /tmp/build/openssl RUN wget https://www.openssl.org/source/openssl-1.1.1q.tar.gz && \ tar -xf openssl-1.1.1q.tar.gz && \ cd openssl-1.1.1q && \ ./config no-shared && \ sed -i -r '1s/^/#include <string.h>\n/' test/v3ext.c && \ make && \ make install && \ rm -rf /tmp/build FROM base AS libimobiledevice WORKDIR /tmp/build/libimobiledevice COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ COPY --from=libusbmuxd /usr/local/ /usr/local/ COPY --from=openssl /usr/local/include/ /usr/local/include/ COPY --from=openssl /usr/local/lib/ /usr/local/lib/ ENV CC="gcc" \ CXX="g++" RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libimobiledevice.git . && \ ./autogen.sh $CONF_ARGS --without-cython LDFLAGS=-ldl && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS curl WORKDIR /tmp/build/curl COPY --from=openssl /usr/local/include/ /usr/local/include/ COPY --from=openssl /usr/local/lib/ /usr/local/lib/ RUN wget https://curl.se/download/curl-7.85.0.tar.xz && \ tar -xvf curl-7.85.0.tar.xz && \ cd curl-7.85.0 && \ LDFLAGS=-ldl cmake . $CMAKE_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build @@ -111,4 +126,4 @@ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/idev make -j$(nproc) && \ make install && \ rm -rf /tmp/build RUN ldconfig -
lunaynx renamed this gist
Oct 5, 2022 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
lunaynx revised this gist
Oct 2, 2022 . 1 changed file with 28 additions and 12 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,16 +17,26 @@ RUN apt-get -y update && \ # Build libimobiledevice FROM base AS libplist WORKDIR /tmp/build/libplist RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libplist.git . && \ ./autogen.sh $CONF_ARGS --without-cython && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libimobiledevice-glue WORKDIR /tmp/build/libimobiledevice-glue COPY --from=libplist /usr/local/ /usr/local/ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libimobiledevice-glue.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libusbmuxd WORKDIR /tmp/build/libusbmuxd COPY --from=libplist /usr/local/ /usr/local/ COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libusbmuxd.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ @@ -35,7 +45,10 @@ RUN git clone https://github.com/libimobiledevice/libusbmuxd.git . && \ FROM base AS libimobiledevice WORKDIR /tmp/build/libimobiledevice COPY --from=libusbmuxd /usr/local/ /usr/local/ COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ ENV CC="gcc" \ CXX="g++" RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libimobiledevice.git . && \ ./autogen.sh $CONF_ARGS --without-cython && \ make -j$(nproc) && \ make install && \ @@ -44,32 +57,33 @@ RUN git clone https://github.com/libimobiledevice/libimobiledevice.git . && \ # Build libirecovery and idevicerestore FROM base AS curl WORKDIR /tmp/build/curl RUN git clone --single-branch --depth 1 https://github.com/curl/curl.git . && \ cmake . $CMAKE_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libusb WORKDIR /tmp/build/libusb RUN git clone --single-branch --depth 1 https://github.com/libusb/libusb.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libirecovery WORKDIR /tmp/build/libirecovery COPY --from=libimobiledevice-glue /usr/local/ /usr/local/ COPY --from=libusb /usr/local/ /usr/local/ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/libirecovery.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS zlib WORKDIR /tmp/build/zlib RUN git clone --single-branch --depth 1 https://github.com/madler/zlib.git . && \ ./configure && \ make -j$(nproc) && \ make install && \ @@ -78,19 +92,21 @@ RUN git clone https://github.com/madler/zlib.git . && \ FROM base AS libzip WORKDIR /tmp/build/libzip COPY --from=zlib /usr/local/ /usr/local/ RUN git clone --single-branch --depth 1 https://github.com/nih-at/libzip.git . && \ cmake . $CMAKE_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS idevicerestore WORKDIR /tmp/build/idevicerestore COPY --from=curl /usr/local/include/ /usr/local/include/ COPY --from=curl /usr/local/lib/ /usr/local/lib/ COPY --from=libimobiledevice /usr/local/ /usr/local/ COPY --from=libirecovery /usr/local/ /usr/local/ COPY --from=libzip /usr/local/include/ /usr/local/include/ COPY --from=libzip /usr/local/lib/ /usr/local/lib/ RUN git clone --single-branch --depth 1 https://github.com/libimobiledevice/idevicerestore.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ -
lunaynx revised this gist
Jul 29, 2021 . No changes.There are no files selected for viewing
-
lunaynx revised this gist
Jul 29, 2021 . No changes.There are no files selected for viewing
-
lunaynx created this gist
Jul 29, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,98 @@ FROM debian:buster AS base ENV CONF_ARGS="--disable-shared" \ CMAKE_ARGS="-DBUILD_SHARED_LIBS=0" \ CC="clang" \ CXX="clang++" \ LD="ld.lld" \ CFLAGS="-fPIC" \ CXXFLAGS="-fPIC" \ LDFLAGS="-Wl,--allow-multiple-definition" RUN apt-get -y update && \ apt-get -y install --no-install-recommends ca-certificates gnupg wget && \ echo 'deb http://apt.llvm.org/buster/ llvm-toolchain-buster main' > /etc/apt/sources.list.d/llvm.list && \ wget -O- https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - && \ apt-get -y update && \ apt-get -y install --no-install-recommends autoconf automake clang cmake gcc git libreadline-dev libssl-dev libtool-bin libudev-dev make pkg-config # Build libimobiledevice FROM base AS libplist WORKDIR /tmp/build/libplist RUN git clone https://github.com/libimobiledevice/libplist.git . && \ ./autogen.sh $CONF_ARGS --without-cython && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libusbmuxd WORKDIR /tmp/build/libusbmuxd COPY --from=libplist /usr/local/ /usr/local/ RUN git clone https://github.com/libimobiledevice/libusbmuxd.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libimobiledevice WORKDIR /tmp/build/libimobiledevice COPY --from=libusbmuxd /usr/local/ /usr/local/ RUN git clone https://github.com/libimobiledevice/libimobiledevice.git . && \ ./autogen.sh $CONF_ARGS --without-cython && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build # Build libirecovery and idevicerestore FROM base AS curl WORKDIR /tmp/build/curl RUN git clone https://github.com/curl/curl.git . && \ cmake . $CMAKE_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libusb WORKDIR /tmp/build/libusb RUN git clone https://github.com/libusb/libusb.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libirecovery WORKDIR /tmp/build/libirecovery COPY --from=libusb /usr/local/ /usr/local/ RUN git clone https://github.com/libimobiledevice/libirecovery.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS zlib WORKDIR /tmp/build/zlib RUN git clone https://github.com/madler/zlib.git . && \ ./configure && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS libzip WORKDIR /tmp/build/libzip COPY --from=zlib /usr/local/ /usr/local/ RUN git clone https://github.com/nih-at/libzip.git . && \ cmake . $CMAKE_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build FROM base AS idevicerestore WORKDIR /tmp/build/idevicerestore COPY --from=curl /usr/local/ /usr/local/ COPY --from=libimobiledevice /usr/local/ /usr/local/ COPY --from=libirecovery /usr/local/ /usr/local/ COPY --from=libzip /usr/local/ /usr/local/ RUN git clone https://github.com/libimobiledevice/idevicerestore.git . && \ ./autogen.sh $CONF_ARGS && \ make -j$(nproc) && \ make install && \ rm -rf /tmp/build RUN ldconfig