2022-01-14 08:54:23 +00:00
|
|
|
# docker build -t clickhouse/docs-builder .
|
2024-09-23 10:31:06 +00:00
|
|
|
FROM golang:alpine AS htmltest-builder
|
|
|
|
|
|
|
|
ARG HTMLTEST_VERSION=0.17.0
|
|
|
|
|
|
|
|
RUN CGO_ENABLED=0 go install github.com/wjdp/htmltest@v${HTMLTEST_VERSION} \
|
|
|
|
&& mv "${GOPATH}/bin/htmltest" /usr/bin/htmltest
|
|
|
|
|
2022-04-14 22:38:16 +00:00
|
|
|
# nodejs 17 prefers ipv6 and is broken in our environment
|
2022-06-08 12:25:41 +00:00
|
|
|
FROM node:16-alpine
|
2022-04-14 22:38:16 +00:00
|
|
|
|
2024-10-19 00:00:24 +00:00
|
|
|
RUN apk add --no-cache git openssh bash
|
2022-04-14 22:38:16 +00:00
|
|
|
|
2023-11-11 00:27:09 +00:00
|
|
|
# At this point we want to really update /opt/clickhouse-docs directory
|
|
|
|
# So we reset the cache
|
2022-06-08 12:25:41 +00:00
|
|
|
ARG CACHE_INVALIDATOR=0
|
2022-04-14 22:38:16 +00:00
|
|
|
|
|
|
|
RUN git clone https://github.com/ClickHouse/clickhouse-docs.git \
|
2022-06-08 12:25:41 +00:00
|
|
|
--depth=1 --branch=main /opt/clickhouse-docs
|
2022-04-14 22:38:16 +00:00
|
|
|
|
|
|
|
WORKDIR /opt/clickhouse-docs
|
|
|
|
|
|
|
|
RUN yarn config set registry https://registry.npmjs.org \
|
2022-04-15 14:27:09 +00:00
|
|
|
&& yarn install \
|
|
|
|
&& yarn cache clean
|
2022-04-14 22:38:16 +00:00
|
|
|
|
2024-09-23 12:35:05 +00:00
|
|
|
ENV HOME /opt/clickhouse-docs
|
|
|
|
|
|
|
|
RUN mkdir /output_path \
|
|
|
|
&& chmod -R a+w . /output_path \
|
|
|
|
&& git config --global --add safe.directory /opt/clickhouse-docs
|
|
|
|
|
2022-04-14 22:38:16 +00:00
|
|
|
COPY run.sh /run.sh
|
2024-09-23 10:31:06 +00:00
|
|
|
COPY --from=htmltest-builder /usr/bin/htmltest /usr/bin/htmltest
|
2022-04-14 22:38:16 +00:00
|
|
|
|
|
|
|
ENTRYPOINT ["/run.sh"]
|