github.com/pojntfx/hydrapp/hydrapp@v0.0.0-20240516002902-d08759d6ca9f/pkg/builders/dmg/Dockerfile (about)

     1  FROM crazymax/osxcross:latest-debian AS osxcross
     2  
     3  FROM golang:bookworm
     4  
     5  COPY --from=osxcross /osxcross /osxcross
     6  
     7  RUN rm -rf /opt
     8  RUN ln -s /osxcross/macports/pkgs/opt/ /opt
     9  
    10  # Install native dependencies
    11  RUN apt update
    12  RUN apt install -y genisoimage make clang lld libc6-dev bzip2 curl npm tree jq zlib1g-dev cmake
    13  
    14  RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
    15  
    16  ENV PATH="/osxcross/bin:/root/.cargo/bin:$PATH"
    17  ENV LD_LIBRARY_PATH="/osxcross/lib:$LD_LIBRARY_PATH"
    18  
    19  ENV OSXCROSS_PKG_CONFIG_USE_NATIVE_VARIABLES=1
    20  ENV MACOSX_DEPLOYMENT_TARGET=12.0
    21  ENV OSXCROSS_MP_INC=1
    22  ENV GOOS=darwin
    23  ENV CGO_ENABLED=1
    24  
    25  RUN yes 1 | osxcross-macports select-mirror || true
    26  
    27  RUN cargo install apple-codesign
    28  
    29  RUN git clone --branch only_what_core_needs https://github.com/fanquake/libdmg-hfsplus.git /tmp/libdmg-hfsplus
    30  WORKDIR /tmp/libdmg-hfsplus
    31  RUN cmake . -B build
    32  RUN make -C build/dmg -j "$(nproc)"
    33  RUN install build/dmg/dmg /usr/local/bin
    34  RUN rm -rf /tmp/libdmg-hfsplus
    35  
    36  RUN git config --global --add safe.directory '*'
    37  
    38  COPY entrypoint.sh /entrypoint.sh
    39  
    40  WORKDIR /hydrapp/work
    41  
    42  CMD /entrypoint.sh