-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
43 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,60 +1,63 @@ | ||
FROM --platform=$TARGETOS/$TARGETARCH ubuntu:22.04 | ||
FROM --platform=$TARGETOS/$TARGETARCH ubuntu:22.04 | ||
|
||
LABEL author="Daniel Barton" maintainer="danny6167@gmail.com" | ||
|
||
ENV DEBIAN_FRONTEND noninteractive | ||
|
||
#RUN timedatectl set-timezone Etc/UTC | ||
RUN dpkg --add-architecture i386 | ||
|
||
RUN dpkg --add-architecture i386 \ | ||
&& apt update \ | ||
RUN apt update \ | ||
&& apt upgrade -y | ||
|
||
RUN apt install -y \ | ||
gcc \ | ||
curl \ | ||
libcurl4-gnutls-dev:i386 \ | ||
libssl3:i386 libcurl4:i386 \ | ||
lib32tinfo6 \ | ||
libtinfo6:i386 \ | ||
lib32z1 \ | ||
lib32stdc++6 \ | ||
libncurses5:i386 \ | ||
libcurl3-gnutls:i386 \ | ||
libsdl2-2.0-0:i386 \ | ||
gcc \ | ||
g++ \ | ||
libgcc1 \ | ||
libc++-dev \ | ||
gdb \ | ||
gettext \ | ||
libc6 \ | ||
curl \ | ||
tar \ | ||
iproute2 \ | ||
locales \ | ||
net-tools \ | ||
tar \ | ||
tini \ | ||
tzdata \ | ||
lib32stdc++6 \ | ||
lib32tinfo6 \ | ||
lib32z1 \ | ||
libatomic1 \ | ||
libc++-dev \ | ||
libc6 \ | ||
libsdl1.2debian \ | ||
libsdl2-2.0-0 \ | ||
libfontconfig \ | ||
locales \ | ||
libcurl3-gnutls \ | ||
libcurl3-gnutls:i386 \ | ||
libcurl4-gnutls-dev:i386 \ | ||
libcurl4:i386 \ | ||
libgcc1 \ | ||
libncurses5:i386 \ | ||
libfontconfig \ | ||
libnss-wrapper \ | ||
libpulse-dev \ | ||
libpulse0 \ | ||
libsdl1.2debian \ | ||
libsdl2-2.0-0 \ | ||
libsdl2-2.0-0:i386 \ | ||
libssl3:i386 \ | ||
libtinfo6:i386 | ||
libnss-wrapper \ | ||
gettext \ | ||
tzdata \ | ||
lsb-release | ||
|
||
## Prepare NSS Wrapper for the entrypoint as a workaround for Valheim 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 | ||
## configure locale | ||
RUN update-locale lang=en_US.UTF-8 \ | ||
&& dpkg-reconfigure --frontend noninteractive locales | ||
|
||
## 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 | ||
RUN useradd -m -d /home/container -s /bin/bash container | ||
USER container | ||
ENV USER=container HOME=/home/container | ||
WORKDIR /home/container | ||
|
||
## Prepare NSS Wrapper for the entrypoint as a workaround for Valheim 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 | ||
|
||
COPY ./entrypoint.sh /entrypoint.sh | ||
CMD [ "/bin/bash", "/entrypoint.sh" ] | ||
CMD [ "/bin/bash", "/entrypoint.sh" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters