Skip to content

Commit 2a031a6

Browse files
committed
Updated sitebuilder
- 1.5.3 linux/amd64 - 1.5.3_arm64 jekyll 3.9.3 hugo v0.117.0-b2f0696cad918fb61420a6aff173eb36662b406e+extended linux/amd64 BuildDate=2023-08-07T12:49:48Z VendorInfo=gohugoio git version 2.30.2 go version go1.21.0 linux/amd64 mkdocs 1.5.2 mkdocs-git-authors-plugin 0.7.2 mkdocs-git-revision-date-localized-plugin 1.2.0 mkdocs-git-revision-date-plugin 0.3.2 mkdocs-macros-plugin 1.0.4 mkdocs-material 9.2.3 mkdocs-material-extensions 1.1.1 mkdocs-minify-plugin 0.7.1 mkdocs-redirects 1.2.1 Signed-off-by: Samir B Amin <sbamin@alumni.bcm.edu>
1 parent 098c2e6 commit 2a031a6

4 files changed

Lines changed: 30 additions & 28 deletions

File tree

Dockerfile

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ FROM ruby:2.7.6
99
MAINTAINER "Samir B. Amin" <tweet:sbamin; sbamin.com/contact>
1010

1111
## NOTE: installing beta version of mkdocs-material with blog support.
12-
LABEL version="1.5.2b1" \
13-
mode="sitebuilder-1.5.2b1" \
12+
LABEL version="1.5.3" \
13+
mode="sitebuilder-1.5.3" \
1414
description="docker image to build jekyll, hugo or mkdocs supported website" \
1515
website="https://github.com/sbamin/sitebuilder" \
1616
issues="https://github.com/sbamin/sitebuilder/issues"
@@ -58,10 +58,11 @@ RUN rm -rf /var/lib/apt/lists/partial && \
5858
## force update packages if failed earlier
5959
pip3 install --upgrade singledispatch nltk six && \
6060
pip3 install markdown pygments fontawesome_markdown pymdown-extensions && \
61-
pip3 install mkdocs mkdocs-material==9.2.0b3 mkdocs-git-revision-date-plugin mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-redirects pymdown-extensions mkdocs-macros-plugin mike mkdocs-git-authors-plugin && \
61+
pip3 install mkdocs mkdocs-material mkdocs-git-revision-date-plugin mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-redirects pymdown-extensions mkdocs-macros-plugin mike mkdocs-git-authors-plugin && \
6262
## force update mkdocs env
6363
pip3 install --upgrade markdown pygments fontawesome_markdown pymdown-extensions && \
64-
pip3 install --upgrade mkdocs mkdocs-material==9.2.0b3 mkdocs-git-revision-date-plugin mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-redirects pymdown-extensions mkdocs-macros-plugin mike mkdocs-git-authors-plugin
64+
pip3 install --upgrade mkdocs mkdocs-material mkdocs-git-revision-date-plugin mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-redirects pymdown-extensions mkdocs-macros-plugin mike mkdocs-git-authors-plugin && \
65+
git config --global --add safe.directory /web
6566

6667
## install latest hugo extended
6768
RUN wget https://github.com/gohugoio/hugo/releases/download/v"${myhugo}"/hugo_extended_"${myhugo}"_linux-amd64.deb && \

Dockerfile_arm64

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ RUN rm -rf /var/lib/apt/lists/partial && \
5858
## force update packages if failed earlier
5959
pip3 install --upgrade singledispatch nltk six && \
6060
pip3 install markdown pygments fontawesome_markdown pymdown-extensions && \
61-
pip3 install mkdocs mkdocs-material==9.2.0b3 mkdocs-git-revision-date-plugin mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-redirects pymdown-extensions mkdocs-macros-plugin mike mkdocs-git-authors-plugin && \
61+
pip3 install mkdocs mkdocs-material mkdocs-git-revision-date-plugin mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-redirects pymdown-extensions mkdocs-macros-plugin mike mkdocs-git-authors-plugin && \
6262
## force update mkdocs env
6363
pip3 install --upgrade markdown pygments fontawesome_markdown pymdown-extensions && \
64-
pip3 install --upgrade mkdocs mkdocs-material==9.2.0b3 mkdocs-git-revision-date-plugin mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-redirects pymdown-extensions mkdocs-macros-plugin mike mkdocs-git-authors-plugin
64+
pip3 install --upgrade mkdocs mkdocs-material mkdocs-git-revision-date-plugin mkdocs-git-revision-date-localized-plugin mkdocs-minify-plugin mkdocs-redirects pymdown-extensions mkdocs-macros-plugin mike mkdocs-git-authors-plugin && \
65+
git config --global --add safe.directory /web
6566

6667
## install latest hugo extended
6768
RUN wget https://github.com/gohugoio/hugo/releases/download/v"${myhugo}"/hugo_extended_"${myhugo}"_linux-arm64.deb && \

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
activesupport (7.0.7)
4+
activesupport (7.0.7.2)
55
concurrent-ruby (~> 1.0, >= 1.0.2)
66
i18n (>= 1.6, < 2)
77
minitest (>= 5.1)

update_sitebuilder.md

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@ git status
1515

1616
>status should be up-to-date and point to `main` git branch.
1717
18-
* Define docker image tag, e.g., `1.5.2b1` typically a level up than [the current version](https://hub.docker.com/r/sbamin/sitebuilder/tags). You need to manually update several of commands below to reflect an updated tag.
18+
* Define docker image tag, e.g., `1.5.3` typically a level up than [the current version](https://hub.docker.com/r/sbamin/sitebuilder/tags). You need to manually update several of commands below to reflect an updated tag.
1919

2020
* Update `Dockerfile` as per your custom changes. At minimum, update LABEL version and mode to reflect an updated tag. You can also update `hugo extended` to the [current release](https://github.com/gohugoio/hugo/releases) by updating *myhugo* ENV variable in `Dockerfile`. Optionally, [update related go version](https://go.dev/dl) with *mygo* ENV variable.
2121

2222
* If you need to update [jekyll](https://jekyllrb.com/) related gems, update `Gemfile` while ensuring gem [version requirements](https://pages.github.com/versions/) for [github-pages](https://github.com/github/pages-gem) gem.
2323

2424
* If you need to update mkdocs-material theme, please make related changes to mkdocs installation in Dockerfile as per [author's instructions from mkdocs-material website](https://squidfunk.github.io/mkdocs-material/upgrade/).
2525

26-
* Start building a docker image. You need to replace `foo/sitebuilder` with your respective [docker hub user id](https://hub.docker.com) and image name you like to rename. Read [manpage for docker build](https://docs.docker.com/engine/reference/commandline/build/).
26+
* Start building a docker image. You need to replace `sbamin/sitebuilder` with your respective [docker hub user id](https://hub.docker.com) and image name you like to rename. Read [manpage for docker build](https://docs.docker.com/engine/reference/commandline/build/).
2727

2828
```sh
2929
## build amd64 version first
30-
docker build --platform linux/amd64 -f Dockerfile -t foo/sitebuilder:1.5.2b1_arm64 .
30+
docker build --platform linux/amd64 -f Dockerfile -t sbamin/sitebuilder:1.5.3 .
3131
```
3232

3333
>NOTE: If using docker on Mac M1/M2, you should add `--platform linux/amd64` given sitebuilder docker image is configured for amd64 and not arm64 architecture. To use arm64 architecture, you need to update `Dockerfile` to replace `amd64` packages with `arm64` ones, if available from a respective developer. [See relevant details here](https://stackoverflow.com/a/68004485/1243763).
3434
3535
* Optional: To build arm64 docker image, use a separate Dockerfile that installs arm64 packages of hugo and go.
3636

3737
```sh
38-
docker build --platform linux/arm64 -f Dockerfile_arm64 -t foo/sitebuilder:1.5.2b1_arm64 .
38+
docker build --platform linux/arm64 -f Dockerfile_arm64 -t sbamin/sitebuilder:1.5.3_arm64 .
3939
```
4040

4141
PS: Rest of steps are implied for amd64 image, and can be followed for arm64 image too with applicable changes to docker image name.
@@ -45,7 +45,7 @@ PS: Rest of steps are implied for amd64 image, and can be followed for arm64 ima
4545
```sh
4646
## start container in an interactive session and mount local (host) directory
4747
## to an empty location in the docker container.
48-
docker run --platform linux/amd64 --rm -it -v "$(pwd)":/hostspace foo/sitebuilder:1.5.2b1 /bin/bash
48+
docker run --platform linux/amd64 --rm -it -v "$(pwd)":/hostspace sbamin/sitebuilder:1.5.3 /bin/bash
4949

5050
## copy (overwrite) local Gemfile.lock with an updated version from
5151
## the container
@@ -58,7 +58,7 @@ exit
5858
* Check installed or updated package versions
5959

6060
```sh
61-
docker run --platform linux/amd64 --rm foo/sitebuilder:1.5.2b1 /bin/bash -c "jekyll --version && hugo version && git version && go version && pip list | grep mkdocs"
61+
docker run --platform linux/amd64 --rm sbamin/sitebuilder:1.5.3 /bin/bash -c "jekyll --version && hugo version && git version && go version && pip list | grep mkdocs"
6262
```
6363

6464
* Commit and push those to github.
@@ -70,7 +70,7 @@ git add Dockerfile Gemfile.lock update_sitebuilder.md
7070
## -s requires a valid gpg key for signing a message
7171
git commit -s -F- <<EOF
7272
Updated sitebuilder
73-
v1.5.2b1 linux/amd64
73+
v1.5.3 linux/amd64
7474
7575
jekyll 3.9.3
7676
hugo v0.117.0-b2f0696cad918fb61420a6aff173eb36662b406e+extended linux/amd64 BuildDate=2023-08-07T12:49:48Z VendorInfo=gohugoio
@@ -81,7 +81,7 @@ mkdocs-git-authors-plugin 0.7.2
8181
mkdocs-git-revision-date-localized-plugin 1.2.0
8282
mkdocs-git-revision-date-plugin 0.3.2
8383
mkdocs-macros-plugin 1.0.4
84-
mkdocs-material 9.2.0b3
84+
mkdocs-material 9.2.3
8585
mkdocs-material-extensions 1.1.1
8686
mkdocs-minify-plugin 0.7.1
8787
mkdocs-redirects 1.2.1
@@ -99,35 +99,35 @@ Upload your docker image to [docker hub](https://www.docker.com), [github packag
9999

100100
```sh
101101
## unless beta version, remove older docker image tagged as latest, if any on local computer.
102-
docker rmi foo/sitebuilder:latest
103-
docker tag foo/sitebuilder:1.5.2b1 foo/sitebuilder:latest
102+
docker rmi sbamin/sitebuilder:latest
103+
docker tag sbamin/sitebuilder:1.5.3 sbamin/sitebuilder:latest
104104
```
105105

106106
* Besides updating Docker Hub, if you are updating image also to github packages, update respective aliases.
107107

108108
```sh
109109
## unless beta version, remove older versions
110-
docker rmi ghcr.io/foo/sitebuilder:latest
111-
docker rmi ghcr.io/foo/sitebuilder:1.5.1
112-
docker tag foo/sitebuilder:1.5.2b1 ghcr.io/foo/sitebuilder:1.5.2b1
113-
docker tag foo/sitebuilder:1.5.2b1 ghcr.io/foo/sitebuilder:latest
110+
docker rmi ghcr.io/sbamin/sitebuilder:latest
111+
docker rmi ghcr.io/sbamin/sitebuilder:latest
112+
docker tag sbamin/sitebuilder:1.5.3 ghcr.io/sbamin/sitebuilder:1.5.3
113+
docker tag sbamin/sitebuilder:1.5.3 ghcr.io/sbamin/sitebuilder:latest
114114
```
115115

116-
* Confirm using `docker images` that IMAGE ID of a built image, `foo/sitebuilder:1.5.2b1` matches with aliases created above. If all good, remove previous version of sitebuilder, `docker rmi foo/sitebuilder:1.5.0`
116+
* Confirm using `docker images` that IMAGE ID of a built image, `sbamin/sitebuilder:1.5.3` matches with aliases created above. If all good, remove previous version of sitebuilder, `docker rmi sbamin/sitebuilder:1.5.0`
117117

118118
* Before pushing images, worth doing a test build and preview run as per [README.md](README.md)
119119

120120
* Push images to docker hub and/or github packages. For github container registry, see [this guide](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry) on authentication.
121121

122122
```sh
123-
docker push foo/sitebuilder:1.5.2b1
124-
docker push foo/sitebuilder:latest
123+
docker push sbamin/sitebuilder:1.5.3
124+
docker push sbamin/sitebuilder:latest
125125

126126
## avoid echo raw password!
127127
## echo $(<decrypt pwd>) | docker login ghcr.io -u USERNAME --password-stdin
128128

129-
docker push ghcr.io/foo/sitebuilder:1.5.2b1
130-
docker push ghcr.io/foo/sitebuilder:latest
129+
docker push ghcr.io/sbamin/sitebuilder:1.5.3
130+
docker push ghcr.io/sbamin/sitebuilder:latest
131131
```
132132

133133
### Get singularity SIF image
@@ -136,9 +136,9 @@ If you prefer using [singularity](https://docs.sylabs.io/guides/3.5/user-guide/s
136136

137137
```sh
138138
## assuming running on linux/amd64 architecture.
139-
singularity run docker://foo/sitebuilder:latest
139+
singularity run docker://sbamin/sitebuilder:latest
140140
## or beta version
141-
singularity run docker://foo/sitebuilder:1.5.2b1
141+
singularity run docker://sbamin/sitebuilder:1.5.3
142142
```
143143

144144
Done!

0 commit comments

Comments
 (0)