/
Base.dockerfile
121 lines (111 loc) · 2.95 KB
/
Base.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
FROM debian:11
ENV DEBIAN_FRONTEND=noninteractive
ENV XZ_OPT=-T0
ENV HOME=/builds/worker \
SHELL=/bin/bash \
USER=worker \
LOGNAME=worker \
HOSTNAME=taskcluster-worker
ENV ARCH=amd64
ARG UID
ARG GID
ARG user
### Add worker user and setup its workspace.
RUN mkdir /builds && \
(getent group $GID || groupadd -g $GID worker) && \
groupmod -n worker `getent group $GID | cut -d: -f1` && \
useradd -u $UID -g $GID -d /builds/worker -s /bin/bash -m worker && \
mkdir -p /builds/worker/workspace && \
chown -R worker:worker /builds
# Declare default working folder
WORKDIR /builds/worker
VOLUME /builds/worker/checkouts
VOLUME /builds/worker/workspace
VOLUME /builds/worker/tooltool-cache
RUN dpkg --add-architecture $ARCH
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt-get install -y \
# from debian-raw
apt-transport-https \
ca-certificates \
# from debian-base
less \
make \
patch \
python3 \
python3-distutils-extra \
python3-minimal \
vim-tiny \
xz-utils \
# from debian-packages
apt-utils \
aptitude \
build-essential \
devscripts \
fakeroot \
# from debian-build
autoconf2.13 \
automake \
bzip2 \
curl \
file \
gawk \
gcc-multilib \
gnupg \
jq \
libucl1 \
p7zip-full \
procps \
rsync \
screen \
tar \
unzip \
uuid \
valgrind \
wget \
x11-utils \
xvfb \
yasm \
zip \
linux-libc-dev \
linux-libc-dev:$ARCH \
pkg-config \
dpkg-dev \
libdbus-glib-1-dev:$ARCH \
libdrm-dev:$ARCH \
libfontconfig1-dev:$ARCH \
libfreetype6-dev:$ARCH \
libgconf2-dev:$ARCH \
libgtk-3-dev:$ARCH \
libgtk2.0-dev:$ARCH \
libpango1.0-dev:$ARCH \
libpulse-dev:$ARCH \
libx11-xcb-dev:$ARCH \
libxt-dev:$ARCH \
libglib2.0-dev \
# extras
wine64 wine upx-ucl nodejs npm \
python3-pip zstd \
libasound2-dev libcurl4-openssl-dev \
libnss3-tools \
python3-cairo \
locales \
liblzma-dev
RUN apt -y install software-properties-common dirmngr apt-transport-https lsb-release ca-certificates && \
add-apt-repository -y "deb http://ppa.launchpad.net/git-core/ppa/ubuntu eoan main" && \
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys A1715D88E1DF1F24 && \
apt-get update && \
apt-get install -y git
# custom
RUN pip3 install zstandard==0.16.0 pip-tools==5.5.0 mar balrogclient
ADD fetch-content /builds/worker/bin/fetch-content
# mbsdiff and mar (built from martools on linux)
ADD mbsdiff /builds/worker/bin/mbsdiff
ADD mar /builds/worker/bin/mar
RUN chown -R worker:worker /builds/worker/bin && chmod 755 /builds/worker/bin/*
ENV PATH="/builds/worker/bin:${PATH}"
# fetches
RUN mkdir -p /builds/worker/fetches/ && \
chown -R worker:worker /builds/worker/fetches
USER worker