-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
47 lines (39 loc) · 1.2 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
FROM debian
RUN apt-get update -y
RUN apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
cmake \
deutex \
zlib1g-dev
ARG ODAMEX_VERSION=10.6.0
ENV ODAMEX_VERSION=${ODAMEX_VERSION}
ADD https://github.com/odamex/odamex/releases/download/${ODAMEX_VERSION}/odamex-src-${ODAMEX_VERSION}.tar.gz /src/
RUN cd /src \
&& tar -zxvf /src/odamex-src-${ODAMEX_VERSION}.tar.gz \
&& cd /src/odamex-src-${ODAMEX_VERSION} \
&& cmake \
-DBUILD_CLIENT=0 \
-DBUILD_SERVER=1 \
-DBUILD_LAUNCHER=0 \
-DBUILD_MASTER=0 \
-DBUILD_OR_FAIL=1 \
-DCMAKE_BUILD_TYPE=MinSizeRel \
-DCMAKE_INSTALL_PREFIX=/usr/local . \
&& make -j$(nproc) odasrv install
RUN apt-get remove -y \
build-essential \
cmake \
deutex \
zlib1g-dev \
&& apt-get install -y --no-install-recommends \
zlib1g \
&& apt-get autoremove -y \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /src
ARG UID=101
ARG GID=101
RUN groupadd --gid $GID odamex \
&& useradd --uid $UID --gid odamex --shell /bin/bash --create-home -d /odamex odamex
USER odamex
ENTRYPOINT ["/usr/local/bin/odasrv"]