File: Dockerfile.docs

package info (click to toggle)
pg-auto-failover 2.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 5,368 kB
  • sloc: ansic: 58,369; python: 5,515; sql: 3,177; makefile: 629; sh: 35
file content (45 lines) | stat: -rw-r--r-- 1,025 bytes parent folder | download | duplicates (2)
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
36
37
38
39
40
41
42
43
44
45
FROM debian:bullseye-slim

RUN apt-get update \
  && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
	curl \
	git \
	gawk \
	make \
	python3 \
    python3-sphinx \
    python3-pip \
	sudo \
	texlive \
    texlive-luatex \
	texlive-latex-extra \
    texlive-fonts-extra \
	latexmk \
	poppler-utils \
	&& rm -rf /var/lib/apt/lists/*

RUN pip3 install sphinx_rtd_theme

WORKDIR /usr/src/pg_auto_failover

COPY Makefile ./
COPY Makefile.azure ./
COPY Makefile.citus ./
COPY ./src ./src
COPY ./docs ./docs

# avoid building the main binary to generate the FSM graphics
RUN touch docs/fsm.png
RUN touch src/bin/pg_autoctl/git-version.h

# still make sure we can produce the tikz graphics (pdf, svg)
# use TERM=dumb to avoid tput error messages when we don't have a terminal
RUN make TERM=dumb -C docs/tikz clean all

# and finally use python-sphinx to produce the docs in html
RUN make -C docs html

RUN find docs

EXPOSE 8000/tcp
CMD ["python3", "-m", "http.server", "--directory", "docs/_build/html"]