You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: update_sitebuilder.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,27 +15,27 @@ git status
15
15
16
16
>status should be up-to-date and point to `main` git branch.
17
17
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.
19
19
20
20
* 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.
21
21
22
22
* 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.
23
23
24
24
* 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/).
25
25
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/).
>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).
34
34
35
35
* Optional: To build arm64 docker image, use a separate Dockerfile that installs arm64 packages of hugo and go.
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
45
45
```sh
46
46
## start container in an interactive session and mount local (host) directory
47
47
## 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
49
49
50
50
## copy (overwrite) local Gemfile.lock with an updated version from
51
51
## the container
@@ -58,7 +58,7 @@ exit
58
58
* Check installed or updated package versions
59
59
60
60
```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"
## -s requires a valid gpg key for signing a message
71
71
git commit -s -F- <<EOF
72
72
Updated sitebuilder
73
-
v1.5.2b1 linux/amd64
73
+
v1.5.3 linux/amd64
74
74
75
75
jekyll 3.9.3
76
76
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
81
81
mkdocs-git-revision-date-localized-plugin 1.2.0
82
82
mkdocs-git-revision-date-plugin 0.3.2
83
83
mkdocs-macros-plugin 1.0.4
84
-
mkdocs-material 9.2.0b3
84
+
mkdocs-material 9.2.3
85
85
mkdocs-material-extensions 1.1.1
86
86
mkdocs-minify-plugin 0.7.1
87
87
mkdocs-redirects 1.2.1
@@ -99,35 +99,35 @@ Upload your docker image to [docker hub](https://www.docker.com), [github packag
99
99
100
100
```sh
101
101
## 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
104
104
```
105
105
106
106
* Besides updating Docker Hub, if you are updating image also to github packages, update respective aliases.
107
107
108
108
```sh
109
109
## 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
114
114
```
115
115
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`
117
117
118
118
* Before pushing images, worth doing a test build and preview run as per [README.md](README.md)
119
119
120
120
* 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.
0 commit comments