1 FROM
localhost/dev:latest
4 ARG
WORKER_HOME=/home/
${WORKER} 5 ARG
STASH=/usr/local/share/stash
6 ARG
STORE=/usr/local/share/store
8 RUN
useradd
--system
-s
/usr/bin/bash
-u
${WORKER_ID} -m
${WORKER} -G
wheel
9 RUN
echo
"worker
ALL=(ALL:ALL)
NOPASSWD:
ALL"
|
sudo
tee
/etc/sudoers.d/worker
11 RUN
mkdir
-pv
${STASH} ${STORE} 12 RUN
chown
-R
${WORKER_ID}:worker
/usr/local/*
14 RUN
mkdir
-pv
${WORKER_HOME}/.stash
15 WORKDIR
${WORKER_HOME}/.stash
16 RUN
hg
clone
https://vc.compiler.company/infra
18 ENV
CARGO_HOME="/usr/local/share/rust/cargo"
19 ENV
RUSTUP_HOME="/usr/local/share/rust/rustup"
20 ENV
PATH="
$PATH:/usr/local/share/cargo/bin:/usr/local/share/lisp/bin"
21 RUN
mkdir
-pv
.stash/tmp
22 RUN
skel
install
quicklisp
24 WORKDIR
${WORKER_HOME} 25 RUN
hg
clone
https://vc.compiler.company/home
.stash/home
&& cd
.stash/home
&& hg
up
${WORKER} 26 RUN
cp
.stash/home/.homerc
${WORKER_HOME}/.homerc
29 ENV
WORKER_ID=
${WORKER_ID} 30 ENV
WORKER_HOME=
${WORKER_HOME}