-
-
Notifications
You must be signed in to change notification settings - Fork 155
/
Dockerfile
53 lines (42 loc) · 1.5 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
####################################################
# GOLANG BUILDER
####################################################
FROM golang:1.23 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:22.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" ]