-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
61 lines (38 loc) · 1.41 KB
/
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
54
55
56
57
58
59
60
61
# Dockerfile
#
# Project: supertuxkart-server
# License: GNU GPLv3
#
# Copyright (C) 2020 Robert Cernansky
FROM debian:11 AS base
LABEL version="0.0.1" \
description="SuperTuxKart server with integrated bots" \
maintainer="steasenburger"
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
zlib1g openssl libcurl4 libenet7 procps
RUN apt-get clean
FROM base AS builder
RUN apt-get update
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential cmake pkg-config zlib1g-dev libssl-dev libcurl4-openssl-dev libenet-dev git subversion \
ca-certificates
RUN git clone -b 1.3 --depth 1 https://github.com/supertuxkart/stk-code.git
RUN svn co https://svn.code.sf.net/p/supertuxkart/code/stk-assets stk-assets
#COPY stk-code stk-code
#COPY stk-assets stk-assets
RUN cd stk-code && \
mkdir build && \
cd build && \
cmake .. -DSERVER_ONLY=ON -DUSE_SYSTEM_ENET=ON && \
make -j$(nproc) && \
make install
FROM base
COPY --from=builder /usr/local /usr/local
RUN useradd --shell /bin/false --create-home stk
RUN mkdir -p /home/stk/.config/supertuxkart/config-0.10/ && chown -R stk:stk /home/stk/.config
EXPOSE 2759
EXPOSE 2757
USER stk
COPY --chown=stk:stk supertuxkart-entrypoint.sh /supertuxkart-entrypoint.sh
ENTRYPOINT /supertuxkart-entrypoint.sh