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
+24-18Lines changed: 24 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,24 +15,24 @@ 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.4.2` 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.4.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
-
* 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 respective occurrences of `hugo_extended_0.95.0_Linux-64bit.deb` in `Dockerfile`.
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 respective occurrences of `hugo_extended_0.101.0_Linux-64bit.deb` in `Dockerfile`.
21
21
22
-
* If you need to update [jekyll](https://jekyllrb.com/) related gems, update `Gemfile`.
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
* 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/).
25
25
26
26
```sh
27
-
docker build -t foo/sitebuilder:1.4.2.
27
+
docker build -t foo/sitebuilder:1.4.3.
28
28
```
29
29
30
30
* Once image is successfully built, copy `Gemfile.lock` back to host, so that we can update it with the most recent versions of gems.
31
31
32
32
```sh
33
33
## start container in an interactive session and mount local (host) directory
34
34
## to an empty location in the docker container.
35
-
docker run -it -v "$(pwd)":/hostspace foo/sitebuilder:1.4.2 /bin/bash
35
+
docker run -it -v "$(pwd)":/hostspace foo/sitebuilder:1.4.3 /bin/bash
36
36
37
37
## copy (overwrite) local Gemfile.lock with an updated version from
38
38
## the container
@@ -51,10 +51,9 @@ git status
51
51
* Check installed or updated package versions
52
52
53
53
```sh
54
-
docker run --rm foo/sitebuilder:1.4.2 /bin/bash -c "jekyll --version"
55
-
docker run --rm foo/sitebuilder:1.4.2 /bin/bash -c "hugo version"
56
-
docker run --rm foo/sitebuilder:1.4.2 /bin/bash -c "pip list | grep
57
-
mkdocs"
54
+
docker run --rm foo/sitebuilder:1.4.3 /bin/bash -c "jekyll --version"
55
+
docker run --rm foo/sitebuilder:1.4.3 /bin/bash -c "hugo version"
56
+
docker run --rm foo/sitebuilder:1.4.3 /bin/bash -c "pip list | grep mkdocs"
@@ -82,26 +81,33 @@ Upload your docker image to [docker hub](https://www.docker.com), [github packag
82
81
* Tag or alias updated image to `latest`. This will overwrite existing alias to `latest` which is typically an older image, e.g., 1.4.1
83
82
84
83
```sh
85
-
docker tag foo/sitebuilder:1.4.2 foo/sitebuilder:latest
84
+
docker tag foo/sitebuilder:1.4.3 foo/sitebuilder:latest
86
85
```
87
86
88
87
* Besides updating Docker Hub, if you are updating image also to github packages, update respective aliases.
89
88
90
89
```sh
91
-
docker tag foo/sitebuilder:1.4.2 ghcr.io/foo/sitebuilder:1.4.2
92
-
docker tag foo/sitebuilder:1.4.2 ghcr.io/foo/sitebuilder:latest
90
+
docker tag foo/sitebuilder:1.4.3 ghcr.io/foo/sitebuilder:1.4.3
91
+
docker tag foo/sitebuilder:1.4.3 ghcr.io/foo/sitebuilder:latest
93
92
```
94
93
95
-
* Confirm using `docker images` that IMAGE ID of a built image, `foo/sitebuilder:1.4.2` matches with aliases created above.
94
+
* Confirm using `docker images` that IMAGE ID of a built image, `foo/sitebuilder:1.4.3` matches with aliases created above.
96
95
97
96
* 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.
98
97
99
98
```sh
100
-
docker push foo/sitebuilder:1.4.2
99
+
docker push foo/sitebuilder:1.4.3
101
100
docker push foo/sitebuilder:latest
102
101
103
-
docker push ghcr.io/foo/sitebuilder:1.4.2
102
+
docker push ghcr.io/foo/sitebuilder:1.4.3
104
103
docker push ghcr.io/foo/sitebuilder:latest
105
104
```
106
105
106
+
### Get singularity SIF image
107
+
108
+
If you prefer using [singularity](https://docs.sylabs.io/guides/3.5/user-guide/singularity_and_docker.html) SIF image, run following command to get an updated SIF image.
109
+
110
+
```sh
111
+
singularity run docker://sbamin/sitebuilder:latest
0 commit comments