2023-07-13 18:13:07 +00:00
|
|
|
# syntax=docker/dockerfile:1
|
2023-05-05 09:24:28 +00:00
|
|
|
FROM ghcr.io/hadolint/hadolint:latest-alpine AS hadolint-binary
|
|
|
|
|
2023-07-13 18:13:07 +00:00
|
|
|
# Since we're building against edge at risk, it is important to note
|
|
|
|
# that anything might go wrong.
|
2023-05-05 09:24:28 +00:00
|
|
|
FROM alpine:edge AS buildkit
|
|
|
|
|
2023-08-16 16:25:30 +00:00
|
|
|
# Since hadolint isn't in the package repos for Alpine yet, we'll copying from the offical
|
2023-07-13 18:13:07 +00:00
|
|
|
# Docker image instead.
|
|
|
|
COPY --from=hadolint-binary /bin/hadolint /usr/bin/hadolint
|
|
|
|
|
|
|
|
ENV PACKAGES=/usr/local/lib/python3.11/site-packages
|
2023-09-12 12:58:11 +00:00
|
|
|
ENV PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/root/.local/bin
|
2023-07-13 18:13:07 +00:00
|
|
|
ENV PYTHONDONTWRITEBYTECODE=1
|
2023-09-12 12:58:11 +00:00
|
|
|
COPY --from=hadolint-binary /bin/hadolint /usr/bin/hadolint
|
2023-03-24 17:26:49 +00:00
|
|
|
|
|
|
|
# https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#linux but for Alpine
|
2023-05-05 09:24:28 +00:00
|
|
|
# hadolint ignore=DL3018,DL3013
|
2023-03-31 16:14:39 +00:00
|
|
|
RUN apk add --no-cache \
|
2023-03-24 17:26:49 +00:00
|
|
|
cairo-dev \
|
|
|
|
freetype-dev \
|
|
|
|
libffi-dev \
|
|
|
|
jpeg-dev \
|
|
|
|
libpng-dev \
|
2023-03-31 16:14:39 +00:00
|
|
|
zlib-dev \
|
|
|
|
bash \
|
2023-05-05 09:24:28 +00:00
|
|
|
coreutils \
|
|
|
|
python3 \
|
|
|
|
py3-pip \
|
2023-09-12 12:58:11 +00:00
|
|
|
pipx \
|
2023-05-05 09:24:28 +00:00
|
|
|
py3-wheel \
|
|
|
|
shellcheck \
|
2023-07-13 18:13:07 +00:00
|
|
|
gcc \
|
|
|
|
libffi-dev \
|
|
|
|
musl-dev \
|
|
|
|
nodejs \
|
|
|
|
npm \
|
|
|
|
yarn \
|
|
|
|
git \
|
|
|
|
git-fast-import \
|
|
|
|
openssh \
|
2023-07-15 17:51:39 +00:00
|
|
|
gnupg \
|
2023-07-15 18:08:32 +00:00
|
|
|
curl \
|
2023-08-16 17:00:57 +00:00
|
|
|
&& curl -Ls --tlsv1.2 --proto "=https" --retry 3 https://cli.doppler.com/install.sh \
|
2023-07-15 17:51:39 +00:00
|
|
|
| sh
|
2023-08-16 16:25:30 +00:00
|
|
|
# The "--break-system-packages" is added so I don't need to do requirements.txt workaround,
|
|
|
|
# although I also consider using pipx if we wanted to.
|
2023-09-25 09:32:30 +00:00
|
|
|
# See also https://www.jeffgeerling.com/blog/2023/how-solve-error-externally-managed-environment-when-installing-pip3
|
|
|
|
RUN rm -rv /usr/lib/python3*/EXTERNALLY-MANAGED \
|
|
|
|
&& pip install --no-cache \
|
|
|
|
mkdocs-material \
|
|
|
|
mkdocs-git-committers-plugin-2 \
|
2023-03-24 17:26:49 +00:00
|
|
|
mkdocs-git-revision-date-localized-plugin \
|
2023-09-25 09:32:30 +00:00
|
|
|
mkdocs-minify-plugin \
|
|
|
|
mkdocs-redirects \
|
|
|
|
mkdocs-rss-plugin \
|
2023-03-24 17:26:49 +00:00
|
|
|
pillow \
|
2023-09-25 09:32:30 +00:00
|
|
|
cairosvg \
|
|
|
|
pipenv
|
2023-07-13 18:13:07 +00:00
|
|
|
|
|
|
|
# Trust directory, required for git >= 2.35.2
|
|
|
|
# Follows the docs for the Docker-based site build setup
|
|
|
|
RUN git config --global --add safe.directory /docs &&\
|
|
|
|
git config --global --add safe.directory /site
|
|
|
|
|
|
|
|
# Expose MkDocs development server port
|
|
|
|
EXPOSE 8000
|
|
|
|
|
2023-07-15 17:51:39 +00:00
|
|
|
WORKDIR /docs
|
|
|
|
|
|
|
|
#COPY entrypoint.sh /usr/local/bin/entrypoint
|
|
|
|
CMD [ "mkdocs", "serve", "--dev-addr=0.0.0.0:8000" ]
|