-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
53 lines (39 loc) · 962 Bytes
/
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
# samp-server-docker Dockerfile
FROM debian:bullseye-slim
ARG TGZ_FILE
ARG APP_ROOT
ENV TGZ_FILE ${TGZ_FILE}
ENV APP_ROOT ${APP_ROOT}
#
# install environment + architecture
#
RUN dpkg --add-architecture i386
RUN apt update && \
apt upgrade -yy && \
apt install -yy \
apt-utils \
libstdc++6 \
libc6:i386 \
libncurses5:i386 \
libstdc++6:i386 \
procps
#
# copy and extract samp-server file-structure
#
COPY ${TGZ_FILE} /tmp/
RUN [ ! -d "${APP_ROOT}" ] && cd /srv && tar xzvf /tmp/${TGZ_FILE}
#
# edit cfg
#
RUN sed -i 's|changeme|temporary_rcon_password_change_me!|' ${APP_ROOT}/server.cfg
#RUN sed -i 's|announce 0|announce 1|' /srv/samp03/server.cfg
# map server log to STDOUT => use `docker logs samp-server-name` to explore it
RUN ln -sf /dev/stdout ${APP_ROOT}/server_log.txt
#
# run server
#
EXPOSE 7777
COPY bin/start.sh /start.sh
STOPSIGNAL SIGINT
WORKDIR ${APP_ROOT}
ENTRYPOINT ["/start.sh"]