forked from BigFoxses/stash933
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathContainerfile
More file actions
51 lines (42 loc) · 1.45 KB
/
Containerfile
File metadata and controls
51 lines (42 loc) · 1.45 KB
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
FROM debian:bookworm-slim
ENV DEBIAN_FRONTEND=noninteractive
ENV THEOS=/opt/theos
# 1. Install dependencies
# 1.1. Install Theos prerequisites
# 1.2. Pre-install Theos dependencies
# 1.3. Clean up apt cache to reduce image size
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
bash \
curl \
sudo \
build-essential \
fakeroot \
git \
libxml2 \
perl \
rsync \
zip \
libtinfo6 \
&& rm -rf /var/lib/apt/lists/*
# 2. Non-root user (Theos installer refuses to run as root)
RUN useradd -m builder \
&& echo "builder ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
&& mkdir -p $THEOS && chown builder:builder $THEOS
# 3. Install Theos (CI=1 skips interactive prompts)
USER builder
RUN CI=1 bash -c "$(curl -fsSL https://raw.githubusercontent.com/theos/theos/master/bin/install-theos)"
# 4. Remove auto-downloaded SDKs
RUN rm -rf $THEOS/sdks/*.sdk
# 5. Install iPhoneOS 10.3 SDK
RUN $THEOS/bin/install-sdk iPhoneOS10.3
# 6. Strip i386/x86_64 from top-level TBD archs so the linker doesn't
# mistake them for simulator libs (theos/sdks#56, still open).
RUN find $THEOS/sdks/iPhoneOS10.3.sdk -name '*.tbd' -exec sed -i \
-e '/^archs:/s/, x86_64//g' \
-e '/^archs:/s/x86_64, //g' \
-e '/^archs:/s/, i386//g' \
-e '/^archs:/s/i386, //g' {} +
USER root
WORKDIR /build
CMD ["make", "package", "FINALPACKAGE=1"]