-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
35 lines (24 loc) · 1005 Bytes
/
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
FROM python:3.9-alpine as builder
MAINTAINER Kelvie Wong <[email protected]>
WORKDIR /crawl
COPY ./crawl /crawl
# So git describe works, as it is part of the build
COPY ./.git /.git/
RUN apk add --no-cache make gcc g++ perl git libpng-dev \
libexecinfo-dev ncurses-dev
RUN pip install pyyaml
RUN cd /crawl/crawl-ref/source && \
make -j31 WEBTILES=y EXTRA_LIBS=-lexecinfo
FROM python:3.9-alpine
WORKDIR /crawl
COPY --from=builder /crawl/crawl-ref/source/ /crawl/
COPY --from=builder /crawl/crawl-ref/settings/ /settings/
COPY --from=builder /crawl/crawl-ref/docs/ /docs/
RUN apk add --no-cache gcc musl-dev libexecinfo
RUN pip install -r /crawl/webserver/requirements/dev.py3.txt
RUN echo 'password_db = "/data/passwd.db3"' >> /crawl/webserver/config.py
RUN echo 'settings_db = "/data/settings.db3"' >> /crawl/webserver/config.py
RUN ln -s /data/rcs rcs
RUN ln -s /data/saves saves
EXPOSE 8080
CMD ["sh", "-c", "mkdir -p /data/saves; mkdir -p /data/rcs; exec python webserver/server.py"]