mirror of
https://mau.dev/andreijiroh-dev/website.git
synced 2024-11-25 01:43:41 +00:00
build(docker): 💚 add custom entrypoint script to our CI image
This should be also suitable for local development via Docker too. Signed-off-by: Andrei Jiroh Halili <ajhalili2006@gmail.com>
This commit is contained in:
parent
74adf155a3
commit
6c3c12ebba
3 changed files with 22 additions and 4 deletions
3
.vscode/settings.json
vendored
3
.vscode/settings.json
vendored
|
@ -14,7 +14,8 @@
|
|||
"readme",
|
||||
"meta",
|
||||
"global",
|
||||
"deps-dev"
|
||||
"deps-dev",
|
||||
"docker"
|
||||
],
|
||||
"conventionalCommits.autoCommit": false,
|
||||
"conventionalCommits.promptCI": true,
|
||||
|
|
|
@ -1,14 +1,20 @@
|
|||
FROM squidfunk/mkdocs-material
|
||||
|
||||
# https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#linux but for Alpine
|
||||
RUN apk add \
|
||||
RUN apk add --no-cache \
|
||||
cairo-dev \
|
||||
freetype-dev \
|
||||
libffi-dev \
|
||||
jpeg-dev \
|
||||
libpng-dev \
|
||||
zlib-dev
|
||||
zlib-dev \
|
||||
bash \
|
||||
coreutils
|
||||
RUN pip3 install \
|
||||
mkdocs-git-revision-date-localized-plugin \
|
||||
pillow \
|
||||
cairosvg
|
||||
|
||||
COPY entrypoint.sh /usr/local/bin/entrypoint.sh
|
||||
ENTRYPOINT [ "/usr/local/bin/entrypoint.sh" ]
|
||||
CMD [ "serve" ]
|
11
docker/entrypoint.sh
Executable file
11
docker/entrypoint.sh
Executable file
|
@ -0,0 +1,11 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
if [[ $DEBUG != "" ]]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if [[ $1 = "serve" ]] || [[ $1 == "build" ]] | [[ $1 == "gh-deploy" ]] || [[ $1 == "new" ]]; then
|
||||
exec mkdocs $@
|
||||
else
|
||||
$@
|
||||
fi
|
Loading…
Reference in a new issue