21 lines
372 B
Docker
21 lines
372 B
Docker
FROM ubuntu:22.04
|
|
|
|
ENV DEBIAN_FRONTEND=noninteractive
|
|
|
|
ARG levelNum=0
|
|
|
|
RUN <<EOF
|
|
useradd -m -s /bin/bash player${levelNum}
|
|
echo 'root:superSecretRootPassword' | chpasswd
|
|
echo "player${levelNum}:superSecretPlayerPassword${levelNum}" | chpasswd
|
|
|
|
EOF
|
|
|
|
COPY ./levels/level${levelNum} /home/player$levelNum
|
|
|
|
USER player${levelNum}
|
|
|
|
WORKDIR /home/player$levelNum
|
|
|
|
CMD /bin/bash
|