forked from NetHack/NetHack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
23 lines (17 loc) · 679 Bytes
/
Dockerfile
File metadata and controls
23 lines (17 loc) · 679 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM ubuntu:22.04
ENV DEBIAN_FRONTEND=noninteractive
# Install ttyd and NetHack
RUN apt update && \
apt install -y ttyd nethack-console && \
useradd -m nethack
# Replace /var/games/nethack with a writable version
RUN mkdir -p /home/nethack/hackdir && \
cp -a /var/games/nethack/* /home/nethack/hackdir/ || true && \
chown -R nethack:nethack /home/nethack/hackdir && \
rm -rf /var/games/nethack && \
ln -s /home/nethack/hackdir /var/games/nethack
# Optional: customize name
ENV HACKOPTIONS="name:guest"
USER nethack
WORKDIR /home/nethack
CMD ["ttyd", "--port", "8080", "--theme", "{\"background\":\"#000000\",\"fontSize\":20}", "/usr/games/nethack"]