Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade mkdocs to latest versions #9309

Merged
merged 1 commit into from
Jun 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions images/mkdocs/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerfile
3 changes: 2 additions & 1 deletion images/mkdocs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,15 @@

FROM alpine:3.10

RUN apk update && apk add --no-cache \
RUN apk add --no-cache \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why remove the apk update part?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add's --no-cache performs an update under the hood but doesnt cache the results. you can see the indexes being downloaded twice:

docker run -it --rm alpine
/ # apk update && apk add --no-cache bash
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
v3.12.0-74-gb8f92cf12a [http://dl-cdn.alpinelinux.org/alpine/v3.12/main]
v3.12.0-76-ge6ea27f814 [http://dl-cdn.alpinelinux.org/alpine/v3.12/community]
OK: 12734 distinct packages available
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.12/community/x86_64/APKINDEX.tar.gz
(1/4) Installing ncurses-terminfo-base (6.2_p20200523-r0)
(2/4) Installing ncurses-libs (6.2_p20200523-r0)
(3/4) Installing readline (8.0.4-r0)
(4/4) Installing bash (5.0.17-r0)
Executing bash-5.0.17-r0.post-install
Executing busybox-1.31.1-r16.trigger
OK: 8 MiB in 18 packages

also see SO

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. Nice trick.

bash \
git \
git-fast-import \
openssh \
python3 \
python3-dev \
curl \
build-base \
&& python3 -m ensurepip \
&& rm -r /usr/lib/python*/ensurepip \
&& pip3 install --upgrade pip setuptools \
Expand Down
9 changes: 4 additions & 5 deletions images/mkdocs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
mkdocs-material~=4.4.0
mkdocs~=1.0.4
# mkdocs-awesome-pages-plugin~=1.2.0
pymdown-extensions==6.2.1
pygments~=2.3.1
mkdocs-material~=5.2.3
mkdocs~=1.1.2
pymdown-extensions==7.1
pygments~=2.6.1
9 changes: 5 additions & 4 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ markdown_extensions:
permalink: ' ¶'
theme:
name: material
feature:
tabs: true
logo:
icon: 'public' # globe icon
features:
- tabs
icon:
logo: 'material/earth'
favicon: 'img/logo-notext.svg'
palette:
primary: 'teal'
accent: 'green'
Expand Down
2 changes: 2 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
publish = "site"
command = "make build-docs-netlify"
ignore = "git diff --quiet HEAD^ HEAD netlify.toml Makefile mkdocs.yml docs/ images/"
# available here https://github.com/netlify/build-image/blob/xenial/included_software.md#languages
environment = { PYTHON_VERSION = "3.7" }