Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,19 @@ RUN --mount=type=cache,target=/var/cache/apk \
&& pip install pyyaml

RUN mkdir /build \
&& cd /build \
&& git clone ${CRAWL_REPO} --depth 1 crawl \
&& cd crawl \
&& git clone ${CRAWL_REPO} --depth 1 /build/crawl \
&& cd /build/crawl \
&& git fetch origin tag ${CRAWL_TAG} --no-tags \
&& git checkout tags/${CRAWL_TAG} -b ${CRAWL_TAG} \
&& git submodule update --init

RUN cd /build/crawl/crawl-ref/source \
# Alpine patch https://github.com/crawl/crawl/issues/2446
&& sed -i 's/#ifndef __HAIKU__/#if !defined(__HAIKU__) \&\& defined(__GLIBC__)/' crash.cc \
&& make -j$(nproc --ignore=2) WEBTILES=y USE_DGAMELAUNCH=y
&& make -j$(nproc) WEBTILES=y USE_DGAMELAUNCH=y

RUN --mount=type=cache,target=/root/.cache/pip \
pip wheel -w /wheels -r /build/crawl/crawl-ref/source/webserver/requirements/base.py3.txt

###########
# RUNTIME #
Expand All @@ -51,16 +53,16 @@ COPY --from=builder /build/crawl/crawl-ref/docs/ /app/docs/
WORKDIR /app/source

RUN --mount=type=cache,target=/var/cache/apk \
--mount=type=cache,target=/root/.cache/pip \
apk add gcc musl-dev \
&& pip install -r /app/source/webserver/requirements/base.py3.txt
apk add libstdc++ libgcc

COPY --from=builder /wheels /wheels
RUN pip install --no-cache-dir --no-deps /wheels/*.whl \
&& rm -rf /wheels

COPY entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
COPY --chmod=+x entrypoint.sh /app/entrypoint.sh

ENV CRAWL_TAG=${CRAWL_TAG}

VOLUME ["/data"]
EXPOSE 80

ENTRYPOINT ["/entrypoint.sh"]
ENTRYPOINT ["/app/entrypoint.sh"]
Loading