forked from blacktop/ipsw
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.daemon
55 lines (43 loc) · 1.56 KB
/
Dockerfile.daemon
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
54
55
####################################################
# GOLANG BUILDER
####################################################
FROM golang:1.21 as builder
ARG VERSION
COPY . /go/src/github.com/blacktop/ipsw
WORKDIR /go/src/github.com/blacktop/ipsw
RUN CGO_ENABLED=1 go build \
-o /bin/ipswd \
-ldflags "-X github.com/blacktop/ipsw/api/types.BuildVersion==${VERSION}" \
-ldflags "-X github.com/blacktop/ipsw/api/types.BuildTime=$(date -u +%Y%m%d)" \
./cmd/ipswd
####################################################
# 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/ipswd /bin/ipswd
COPY config.example.yml /root/.config/ipsw/config.yml
WORKDIR /data
EXPOSE 3993
ENTRYPOINT [ "/bin/ipswd" ]
CMD [ "--help" ]