-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathDockerfile
76 lines (65 loc) · 1.38 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
FROM ubuntu:24.04
ENV LANG C.UTF-8
ARG JOBS
# Install make and sudo to bootstrap
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get install -y --no-install-recommends \
make \
sudo \
ca-certificates \
git \
build-essential \
autoconf \
automake \
bison \
flex \
gawk \
libtool-bin \
libncurses5-dev \
unzip \
zip \
jq \
libgl-dev \
libglu-dev \
git \
wget \
curl \
cmake \
nasm \
xz-utils \
file \
python3 \
libxml2-dev \
libssl-dev \
texinfo \
help2man \
libz-dev \
rsync \
xxd \
perl \
coreutils \
zstd \
markdown \
libarchive-tools \
gettext
RUN echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
# Create unprivileged user to build toolchains and plugins
RUN useradd --non-unique --create-home --uid 1000 --gid 1000 --shell /bin/bash build
RUN usermod -aG sudo build
# Switch user from root
USER build
# Create toolchain directory
RUN mkdir -p /home/build/rack-plugin-toolchain
WORKDIR /home/build/rack-plugin-toolchain
COPY Makefile /home/build/rack-plugin-toolchain/
# Clean up files to free up space
USER root
RUN rm -rf /var/lib/apt/lists/*
USER build
COPY MacOSX11.1.sdk.tar.* /home/build/rack-plugin-toolchain/
# Build toolchains
RUN JOBS=$JOBS make toolchain-mac
RUN JOBS=$JOBS make toolchain-win
RUN JOBS=$JOBS make toolchain-lin
RUN JOBS=$JOBS make cppcheck
RUN rm MacOSX11.1.sdk.tar.*