forked from pelican-eggs/yolks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (44 loc) · 1.86 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
FROM --platform=$TARGETOS/$TARGETARCH debian:stable-slim
LABEL author="David Wolfe (Red-Thirten)" maintainer="[email protected]"
LABEL org.opencontainers.image.source="https://github.com/parkervcp/yolks"
LABEL org.opencontainers.image.licenses=MIT
## Update base packages and install dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y \
curl \
tzdata \
locales \
iproute2 \
gettext-base \
ca-certificates \
libssl-dev \
lib32gcc-s1 \
libsdl2-2.0-0 \
libsdl2-2.0-0:i386 \
libstdc++6 \
libstdc++6:i386 \
lib32stdc++6 \
libnss-wrapper \
libnss-wrapper:i386 \
libtbb2 \
libtbb2:i386
## Configure locale
RUN update-locale lang=en_US.UTF-8 \
&& dpkg-reconfigure --frontend noninteractive locales
## Prepare NSS Wrapper for the entrypoint as a workaround for Arma 3 requiring a valid UID
ENV NSS_WRAPPER_PASSWD=/tmp/passwd NSS_WRAPPER_GROUP=/tmp/group
RUN touch ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \
&& chgrp 0 ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP} \
&& chmod g+rw ${NSS_WRAPPER_PASSWD} ${NSS_WRAPPER_GROUP}
ADD passwd.template /passwd.template
## Setup user and working directory
RUN useradd -m -d /home/container -s /bin/bash container
USER container
ENV USER=container HOME=/home/container
WORKDIR /home/container
## Copy over and execute entrypoint.sh
COPY ./entrypoint.sh /entrypoint.sh
CMD [ "/bin/bash", "/entrypoint.sh" ]