2019-09-19 15:02:05 +00:00
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
|
|
|
|
FROM ubuntu:18.04
|
|
|
|
|
|
|
|
# Add worker user
|
|
|
|
RUN mkdir /builds && \
|
|
|
|
useradd -d /builds/worker -s /bin/bash -m worker && \
|
|
|
|
chown worker:worker /builds/worker && \
|
|
|
|
mkdir /builds/worker/artifacts && \
|
|
|
|
chown worker:worker /builds/worker/artifacts
|
|
|
|
|
|
|
|
WORKDIR /builds/worker/
|
|
|
|
|
|
|
|
#----------------------------------------------------------------------------------------------------------------------
|
|
|
|
#-- Configuration -----------------------------------------------------------------------------------------------------
|
|
|
|
#----------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
2020-05-13 16:36:48 +00:00
|
|
|
ENV CURL='curl --location --retry 5' \
|
|
|
|
GRADLE_OPTS='-Xmx4096m -Dorg.gradle.daemon=false' \
|
2019-09-24 10:52:05 +00:00
|
|
|
LANG='en_US.UTF-8' \
|
2020-04-01 16:29:35 +00:00
|
|
|
TERM='dumb'
|
2019-09-19 15:02:05 +00:00
|
|
|
|
|
|
|
#----------------------------------------------------------------------------------------------------------------------
|
|
|
|
#-- System ------------------------------------------------------------------------------------------------------------
|
|
|
|
#----------------------------------------------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
RUN apt-get update -qq \
|
|
|
|
# We need to install tzdata before all of the other packages. Otherwise it will show an interactive dialog that
|
|
|
|
# we cannot navigate while building the Docker image.
|
|
|
|
&& apt-get install -y tzdata \
|
|
|
|
&& apt-get install -y openjdk-8-jdk \
|
2021-05-26 09:45:30 +00:00
|
|
|
openjdk-11-jdk \
|
2019-09-19 15:02:05 +00:00
|
|
|
wget \
|
|
|
|
expect \
|
|
|
|
git \
|
|
|
|
curl \
|
|
|
|
python \
|
|
|
|
python-pip \
|
|
|
|
python3 \
|
2020-04-30 21:01:35 +00:00
|
|
|
python3-yaml \
|
2019-09-19 15:02:05 +00:00
|
|
|
locales \
|
|
|
|
unzip \
|
|
|
|
mercurial \
|
|
|
|
&& apt-get clean
|
|
|
|
|
|
|
|
RUN pip install --upgrade pip
|
2019-09-23 11:42:36 +00:00
|
|
|
RUN pip install taskcluster
|
2019-09-19 15:02:05 +00:00
|
|
|
|
2019-09-24 10:52:05 +00:00
|
|
|
RUN locale-gen "$LANG"
|
|
|
|
|
2019-09-19 15:02:05 +00:00
|
|
|
# %include-run-task
|
|
|
|
|
|
|
|
ENV SHELL=/bin/bash \
|
|
|
|
HOME=/builds/worker \
|
2020-03-20 09:26:44 +00:00
|
|
|
PATH="/builds/worker/.local/bin:$PATH"
|
2019-09-19 15:02:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
VOLUME /builds/worker/checkouts
|
|
|
|
VOLUME /builds/worker/.cache
|
|
|
|
|
|
|
|
|
|
|
|
# run-task expects to run as root
|
|
|
|
USER root
|