forked from UBCHREST/ablate
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerDocsFile
30 lines (23 loc) · 975 Bytes
/
DockerDocsFile
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
# Docker file used to serve the ABLATE docs.
ARG ABLATE_DEPENDENCY_IMAGE=ghcr.io/ubchrest/ablate/ablate-dependencies-clang:latest
FROM $ABLATE_DEPENDENCY_IMAGE
# Install testing/docs dependencies
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && apt-get -y install doxygen python3-inflection python3-yaml ruby-dev ruby-bundler
# Copy over the source
COPY . /source
WORKDIR /source
# Configure & build
run cmake --preset=local-ablate-opt
run cmake --build --preset=ablate-only-build -j $(nproc)
# Build the custom documentation components
run python3 /source/docs/ablateDevGenerator.py --rootDir=/source/ --ablateExe=/source/cmake-build-opt-ablate/ablate
# Write the launch script
RUN echo "#!/bin/bash" > /start.sh
RUN echo bundle install >> /start.sh
RUN echo bundle exec jekyll serve --host 0.0.0.0 >> /start.sh
RUN ["chmod", "+x", "/start.sh"]
# Set the working directory to the docs folder
WORKDIR /source/docs
# Set the entry point
ENTRYPOINT ["/start.sh"]