-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile
41 lines (25 loc) · 984 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
FROM registry.opensuse.org/opensuse/leap:latest AS build
WORKDIR /stk
RUN zypper in -y cmake gcc-c++ git libcurl-devel enet-devel libopenssl-devel sqlite3-devel subversion
RUN git clone https://github.com/supertuxkart/stk-code stk-code
RUN svn checkout https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assets
RUN mkdir stk-code/cmake_build && cd stk-code/cmake_build && cmake .. -DSERVER_ONLY=ON && make -j$(nproc) && make install
FROM registry.opensuse.org/opensuse/leap:latest
ENV STK_CONFIG="/stk/config.xml"
ENV STK_SERVER_NAME=""
ENV STK_MOTD=""
ENV STK_USER=""
ENV STK_PASSWORD=""
RUN mkdir -p /stk/data
WORKDIR /stk
COPY --from=build /usr/local/bin/supertuxkart /usr/bin
COPY --from=build /usr/local/share/supertuxkart /usr/local/share/supertuxkart
COPY config.xml /stk/config.xml
RUN touch /stk/motd.txt
COPY stk-server.sh /usr/bin/stk-server
RUN chmod +x /usr/bin/stk-server
EXPOSE 2757
EXPOSE 2759
VOLUME ["/stk"]
STOPSIGNAL SIGTERM
CMD stk-server