Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Docker Image #9063

Open
JM2K69 opened this issue Aug 10, 2023 · 3 comments
Open

[Feature Request] Docker Image #9063

JM2K69 opened this issue Aug 10, 2023 · 3 comments
Labels
fundamental Engineering system and core components

Comments

@JM2K69
Copy link
Contributor

JM2K69 commented Aug 10, 2023

When a release was publish it would be nice to have a docker image for docfx available in CI/CD job.

@yufeih yufeih added the fundamental Engineering system and core components label Aug 11, 2023
@JM2K69
Copy link
Contributor Author

JM2K69 commented Aug 31, 2023

I make some work on the DockerFile

FROM mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim

# Add dotnet tools to path.
ENV PATH="${PATH}:/root/.dotnet/tools"

# Install DocFX as a dotnet tool.
RUN dotnet tool update -g docfx && \
    docfx --version

# Install wkhtmltopdf, used by DocFX to generate PDF files.
ARG TARGETARCH
COPY wkhtmltox/wkhtmltox_0.12.6.1-2.bullseye_${TARGETARCH:-amd64}.deb /tmp/wkhtmltox.deb
RUN apt-get update -qq && \
    export DEBIAN_FRONTEND=noninteractive && \
    apt-get install -y -qq --no-install-recommends /tmp/wkhtmltox.deb && \
    rm -rf /var/lib/apt/lists/* /tmp/* && \
    wkhtmltopdf --version

WORKDIR /opt/prj
VOLUME [ "/opt/prj" ]

ENTRYPOINT [ "docfx" ]

@yufeih
Copy link
Contributor

yufeih commented Nov 7, 2023

Github container registry does not require authentication for public container images - a good place to push the container images in absent of a docker organization account.

@JM2K69
Copy link
Contributor Author

JM2K69 commented Nov 7, 2023

cc @yufeih
With this dockerfile

FROM mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim

# Add dotnet tools to path.
ENV PATH="${PATH}:/root/.dotnet/tools"

# Install DocFX as a dotnet tool.
RUN dotnet tool update -g docfx && \
    docfx --version

# Install dependences for chromium PDF.
RUN apt-get update -qq && apt-get install -y libglib2.0-0 libnss3 libnspr4 \
    libatk1.0-0 libatk-bridge2.0-0 libcups2 libdrm2 libdbus-1-3 libxcb1 \
    libxkbcommon0 libatspi2.0-0 libx11-6 libxcomposite1 \ 
    libxdamage1 libxext6 libxfixes3 libxrandr2 libgbm1 \
    libpango-1.0-0 libcairo2 libasound2

WORKDIR /opt/prj
VOLUME [ "/opt/prj" ]

ENTRYPOINT [ "docfx" ]

during a release we need to build the docker and push it to the github registry container ? I use it in my CI/CD in docker in docker then I plublish it in a private registry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
fundamental Engineering system and core components
Projects
None yet
Development

No branches or pull requests

2 participants