forked from brain-hackers/docker-gen1-builder
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.worker
40 lines (35 loc) · 847 Bytes
/
Dockerfile.worker
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
FROM ${ARCH}debian:bullseye-slim
ARG USER_NAME="builder"
ARG USER_ID="1000"
ARG GROUP_ID="1000"
RUN apt-get update \
&& apt-get install -y \
sudo \
build-essential \
git \
autoconf \
flex \
texinfo \
help2man \
gawk \
libtool-bin \
libncurses-dev \
bison \
wget \
unzip \
xz-utils \
libmpfr-dev \
libgmp-dev \
libmpc-dev \
&& rm -rf /var/lib/apt/lists/*
# install crosstool-ng
RUN wget http://crosstool-ng.org/download/crosstool-ng/crosstool-ng-1.25.0.tar.bz2 \
&& tar xf crosstool-ng-1.25.0.tar.bz2 \
&& cd crosstool-ng-1.25.0 \
&& ./configure \
&& make -j \
&& make install
RUN groupadd -g "${GROUP_ID}" "${USER_NAME}" && \
useradd -l -u "${USER_ID}" -m "${USER_NAME}" -g "${USER_NAME}" -G sudo
USER ${USER_NAME}
WORKDIR /home/${USER_NAME}/