forked from dworkin/dgd
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
38 lines (27 loc) · 1.04 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
# #### #### #### #### #### #### #### #### #### #### #### #### ####
# build using debian bookworm (12)
# #### #### #### #### #### #### #### #### #### #### #### #### ####
FROM --platform=linux/amd64 debian:12-slim
LABEL org.opencontainers.image.source=https://github.com/maldorne/dgd
LABEL org.opencontainers.image.description="DGD mud driver"
LABEL org.opencontainers.image.licenses=AGPL-3.0
# install needed tools
RUN apt-get update && apt-get install -y --force-yes git make gcc clang bison
# create group and user, with uids
RUN groupadd -g 4200 mud
RUN useradd -u 4201 -g 4200 -ms /bin/bash mud
USER mud
WORKDIR /opt/mud
COPY --chown=mud:mud . /opt/mud/driver/
WORKDIR /opt/mud/driver/src
RUN make clean
RUN make
RUN make install
# let's copy the binary to the same directory as other images
RUN cp -R /opt/mud/driver/bin/ /opt/mud/
# remove the code from the image after compiling
# comment this line if you want to check something about the build process
RUN rm -Rf /opt/mud/driver
WORKDIR /opt/mud/
# expose telnet mudos ports
EXPOSE 5000/tcp