-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.ctsim
40 lines (33 loc) · 1.86 KB
/
Dockerfile.ctsim
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
# ctbot-container
# Copyright (C) 2023 Timo Sandmann
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
FROM debian:12-slim
RUN apt-get -y update
RUN mkdir -p /usr/share/man/man1
RUN apt-get -y upgrade
RUN apt-get install -y --no-install-recommends locales bash git wget ssh sudo apt-transport-https ca-certificates dirmngr gnupg software-properties-common && apt-get -y update
RUN sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && locale-gen
RUN apt-get install -y --no-install-recommends mesa-utils libgl1-mesa-glx libgl1-mesa-dri
RUN wget -qO - https://repos.azul.com/azul-repo.key | gpg --dearmor -o /usr/share/keyrings/azul.gpg && echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" > /etc/apt/sources.list.d/zulu.list && apt-get update
RUN apt-get install -y zulu8-jdk fontconfig unzip
RUN useradd -m -u 1000 -G dialout,sudo -s /bin/bash developer && echo "developer:ct-bot" | chpasswd
COPY container_data/entry_ctsim.sh /opt/entry.sh
ARG version=2.29
USER developer
ENV HOME /home/developer
RUN wget -O /home/developer/ct-Sim.jar "https://github.com/tsandmann/ct-sim/releases/download/$version/ct-Sim.jar"
WORKDIR /home/developer
RUN unzip /home/developer/ct-Sim.jar parcours/\* && unzip /home/developer/ct-Sim.jar config/ct-sim.xml
ENTRYPOINT /opt/entry.sh