docfx
docfx copied to clipboard
docfx serve returns empty response on Debian
Operating System: Debian GNU/Linux 10 (buster)
DocFX Version Used: 2.59.0
Template used: default
Steps to Reproduce:
- Create directory with following files:
Dockerfile
FROM alpine:latest as build
ARG DOCFX_VERSION=2.59.0
RUN apk add -U wget unzip && \
mkdir -p /tmp/docfx && \
wget https://github.com/dotnet/docfx/releases/download/v${DOCFX_VERSION}/docfx.zip -O /tmp/docfx.zip && \
unzip /tmp/docfx.zip -d /tmp/docfx
FROM mono:6.8
ARG BUILD_DATE
ARG VCS_REF
RUN apt-get update && \
apt-get install -y \
--no-install-recommends \
--no-install-suggests \
git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* && \
adduser \
--home /nonexistent \
--shell /bin/false \
--no-create-home \
--gecos "" \
--disabled-password \
--disabled-login \
docfx
# Copy downloaded and extracted DocFX sources to runtime container
COPY --from=build --chown=docfx:docfx /tmp/docfx /opt/docfx
# set user-context to unpriviledged user
USER docfx
# Add script to mimic docfx executable
ADD docfx /usr/bin/docfx
# Default port for docfx serve
EXPOSE 8080
ENTRYPOINT ["/usr/bin/docfx"]
docfx
#!/usr/bin/env bash
/usr/bin/mono /opt/docfx/docfx.exe $@
docfx file must have unix-style line endings!
-
build docker image (checkout to directory and run command
docker build docfx-test .) -
run container:
docker run -it -p 8080:8080 docfx-test serve -
open website
localhost:8080
Expected Behavior: Webpage with directory listing
Actual Behavior: http error code ERR_EMPTY_RESPONSE (note this is different from having docfx server not running at all)