-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathDockerfile
More file actions
66 lines (49 loc) · 1.76 KB
/
Dockerfile
File metadata and controls
66 lines (49 loc) · 1.76 KB
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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
FROM ubuntu:24.04 AS build
RUN apt update && \
apt install --no-install-recommends -y \
software-properties-common build-essential gcc cmake \
liblua5.2-dev libtolua-dev libncurses5-dev libsqlite3-dev \
libcjson-dev libiniparser-dev libexpat1-dev libutf8proc-dev
WORKDIR /workspace
COPY CMakeLists.txt eressea/
COPY cmake/ eressea/cmake/
COPY src/ eressea/src/
COPY include/ eressea/include/
COPY storage/ eressea/storage/
COPY clibs/ eressea/clibs/
COPY crpat/ eressea/crpat/
COPY tools/ eressea/tools/
COPY process/CMakeLists.txt eressea/process/
ENV CMAKE_MODULE_PATH=/workspace/eressea/cmake/Modules
RUN cd eressea && ls --recursive /workspace
RUN cd eressea && mkdir -p build
RUN cd eressea/build && cmake ..
RUN cd eressea/build && make
FROM ubuntu:24.04
ARG WWWGROUP=1337
ARG WWWUSER=1337
ARG LOCALE=en_US
ENV DEBIAN_FRONTEND=noninteractive
RUN apt update && apt install --no-install-recommends -y \
locales libcjson1 \
liblua5.2-0 libsqlite3-0 \
libiniparser1 libexpat1 libutf8proc3
RUN echo "$LOCALE.UTF-8 UTF-8" >> /etc/locale.gen && locale-gen
ENV LC_ALL=$LOCALE.UTF-8
ENV LANG=$LOCALE.UTF-8
ENV LANGUAGE=$LOCALE:en
ENV ERESSEA_INSTALL=/usr/local/share/eressea
RUN userdel -r ubuntu
RUN groupadd --force -g $WWWGROUP eressea
RUN useradd -ms /bin/bash --no-user-group -g $WWWGROUP -u $WWWUSER eressea
COPY --from=build /workspace/eressea/build/eressea /usr/local/bin/
COPY scripts/ /usr/local/share/eressea/scripts/
COPY conf/ /usr/local/share/eressea/conf/
COPY res/ /usr/local/share/eressea/res/
RUN chmod -R g+rx,o+rx /usr/local/share/eressea
COPY docker/start-container /usr/local/bin/start-container
RUN chmod 755 /usr/local/bin/start-container
USER $WWWUSER:$WWWGROUP
WORKDIR /data
VOLUME ["/data"]
ENTRYPOINT ["/usr/local/bin/start-container"]