Files
ipsw/Dockerfile
T
dependabot[bot] a26f71dbc0 chore(deps): bump golang from 1.26.1 to 1.26.2 (#1165)
Bumps golang from 1.26.1 to 1.26.2.

---
updated-dependencies:
- dependency-name: golang
  dependency-version: 1.26.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-08 09:33:24 -06:00

54 lines
1.5 KiB
Docker

####################################################
# GOLANG BUILDER
####################################################
FROM golang:1.26.2 AS builder
ARG VERSION
ARG COMMIT
COPY . /go/src/github.com/blacktop/ipsw
WORKDIR /go/src/github.com/blacktop/ipsw
RUN CGO_ENABLED=1 go build \
-o /bin/ipsw \
-ldflags "-X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppVersion=${VERSION}" \
-ldflags "-X github.com/blacktop/ipsw/cmd/ipsw/cmd.AppBuildCommit=${COMMIT}" \
./cmd/ipsw
####################################################
# APFS-FUSE BUILDER
####################################################
FROM ubuntu:24.04
LABEL maintainer="https://github.com/blacktop"
ARG DEBIAN_FRONTEND=noninteractive
RUN buildDeps='libfuse3-dev bzip2 libbz2-dev libz-dev cmake build-essential git libattr1-dev' \
&& apt-get update \
&& apt-get install -y $buildDeps fuse3 unzip lzma tzdata xz-utils \
&& echo "===> Installing apfs-fuse..." \
&& cd /tmp \
&& git clone https://github.com/sgan81/apfs-fuse.git \
&& cd apfs-fuse \
&& git submodule init \
&& git submodule update \
&& mkdir build \
&& cd build \
&& cmake .. \
&& make install \
&& echo "===> Clean up unnecessary files..." \
&& apt-get purge -y --auto-remove $buildDeps \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
ENV LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
ENV IPSW_IN_DOCKER=1
COPY --from=builder /bin/ipsw /bin/ipsw
WORKDIR /data
ENTRYPOINT [ "/bin/ipsw" ]
CMD [ "--help" ]