Skip to content

Commit b8fafca

Browse files
authored
fix: Docker image steps in documentation + limit latest tag to valid Semver git tags (e.g. v0.11.8) (#1349)
* fix: Limit `latest` Docker tag to valid Semver git tags (e.g. v0.1.0) Signed-off-by: Liam Beckman <lbeckman314@gmail.com> * fix: Docker tags (`latest`) Signed-off-by: Liam Beckman <lbeckman314@gmail.com> * fix: Docker tags (`latest`) Signed-off-by: Liam Beckman <lbeckman314@gmail.com> * fix: docker.yaml (`latest` tag) Signed-off-by: Liam Beckman <lbeckman314@gmail.com> * fix: Docker `latest` tag Signed-off-by: Liam Beckman <lbeckman314@gmail.com> * fix: Docker docs Signed-off-by: Liam Beckman <lbeckman314@gmail.com> --------- Signed-off-by: Liam Beckman <lbeckman314@gmail.com>
1 parent 056eb21 commit b8fafca

8 files changed

Lines changed: 47 additions & 244 deletions

File tree

.github/workflows/docker.yaml

Lines changed: 18 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,10 +104,24 @@ jobs:
104104
images: |
105105
${{ env.QUAY_REPO }}
106106
tags: |
107-
type=ref,event=branch
108-
type=ref,event=pr
109-
type=ref,event=tag
110-
type=sha,prefix=
107+
# Semver tag
108+
# Ref: https://github.com/docker/metadata-action/tree/v5#typesemver
109+
type=semver,pattern={{version}},value=${{ github.ref_name }}
110+
111+
# Latest tag
112+
type=raw,value=latest,enable=${{ github.ref_name != '' && !contains(github.ref_name, '-') }}
113+
114+
# Branch
115+
type=ref,event=branch,latest=false
116+
117+
# PR
118+
type=ref,event=pr,latest=false
119+
120+
# Git tag
121+
type=ref,event=tag,latest=false
122+
123+
# SHA
124+
type=sha,prefix=,latest=false
111125
112126
- name: Create manifest list and push
113127
working-directory: ${{ runner.temp }}/digests

.github/workflows/hugo.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ jobs:
5454
- name: Build site with Hugo
5555
run: |
5656
make website
57+
cp install.sh ./docs/install.sh
5758
5859
- name: Upload artifact
5960
uses: actions/upload-pages-artifact@v3

install.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ show_help() {
1111
echo " $0 [version] [install_path] # Install Funnel (default: latest version to \$HOME/.local/bin)"
1212
echo " $0 --list # List available versions"
1313
echo " $0 --help # Show this help"
14+
echo " $0 --version <version> # Specify version to install"
15+
echo " $0 --dest <install_path> # Specify installation path (default: \$HOME/.local/bin)"
1416
}
1517

1618
list_tags() {

website/content/development/developers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This page contains a rough collection of notes for people wanting to build Funne
1717
2. Ensure GOPATH is set. See [the docs][gopath] for help. Also, you probably want to add `$GOPATH/bin` to your `PATH`.
1818
3. Clone funnel and build
1919

20-
```shell
20+
```sh
2121
$ git clone https://github.com/ohsu-comp-bio/funnel.git
2222
$ cd funnel
2323
$ make

website/content/docs/databases/datastore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ to support the task-list queries.
3838
This is typically done through command-line by referencing an **index.yaml**
3939
file (do not change the filename) with the following content:
4040
41-
```shell
41+
```sh
4242
gcloud datastore indexes create path/to/index.yaml --database='funnel'
4343
```
4444

website/content/docs/development/developers.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This page contains a rough collection of notes for people wanting to build Funne
1717
2. Ensure GOPATH is set. See [the docs][gopath] for help. Also, you probably want to add `$GOPATH/bin` to your `PATH`.
1818
3. Clone funnel and build
1919

20-
```shell
20+
```sh
2121
$ git clone https://github.com/ohsu-comp-bio/funnel.git
2222
$ cd funnel
2323
$ make

website/content/download.md

Lines changed: 23 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ menu:
1919
[releases]: https://github.com/ohsu-comp-bio/funnel/releases/latest
2020
[windows]: https://github.com/ohsu-comp-bio/funnel/issues/1258
2121

22+
> [!NOTE]
23+
>
24+
>Funnel requires that [Docker](https://docker.io) be installed in order to run commands within a sandboxed environment.
25+
2226
# Install Options
2327

2428
- [Quick Start (curl one-liner)](#quick-start)
@@ -30,12 +34,10 @@ menu:
3034

3135
## 1. Quick Start
3236

33-
The following command will automatically download and verify the latest version of Funnel for your operating system.
34-
35-
Funnel requires that [Docker](https://docker.io) be installed in order to run commands within a sandboxed environment.
37+
The following [install script](https://github.com/ohsu-comp-bio/funnel/blob/develop/website/static/install.sh) will automatically download and verify the latest version of Funnel for your operating system:
3638

37-
```shell
38-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/ohsu-comp-bio/funnel/refs/heads/develop/install.sh)"
39+
```sh
40+
/bin/bash -c "$(curl -fsSL https://ohsu-comp-bio.github.io/funnel/install.sh)"
3941

4042
funnel server run
4143
```
@@ -44,39 +46,28 @@ funnel server run
4446

4547
The following commands show examples of running Funnel via Docker, Podman, and Singularity.
4648

47-
Each command demonstrates how to mount an optional example config (`example.yaml`) for use by the Funnel Server.
49+
Each command demonstrates how to mount an optional example config (`config.yaml`) for use by the Funnel Server.
4850

49-
```yaml
50-
# example.yaml ➜ local Funnel Server config
51-
Database: boltdb
52-
53-
Compute: local
54-
55-
Logger:
56-
Level: debug
57-
```
58-
59-
> [!WARNING]
51+
> [!TIP]
6052
> When given no config, Funnel will simply run in the default "local" mode.
6153
>
6254
> This can be helpful for testing and development, but production deployments are recommended to use the more robust database and compute backends available.
6355
64-
6556
### Docker
6657

6758
> [!TIP]
6859
>
6960
> Docker Image → [quay.io/repository/ohsu-comp-bio/funnel:latest](https://quay.io/repository/ohsu-comp-bio/funnel?tab=tags&tag=testing)
7061
71-
```shell
72-
docker run -p 8000:8000 -v example.yaml:/example.yaml quay.io/ohsu-comp-bio/funnel:latest server run --config /example.yaml
62+
```sh
63+
docker run -p 8000:8000 quay.io/ohsu-comp-bio/funnel:latest server run
64+
```
65+
66+
To run Funnel with a custom config file (e.g. `config.yaml`), pass it via a Docker volume:
7367

74-
curl localhost:8000/service-info
75-
# {
76-
# "description": "Funnel is a toolkit for distributed task execution via a simple, standard API.",
77-
# "documentationUrl": "https://ohsu-comp-bio.github.io/funnel/",
78-
# ...
79-
# }
68+
```sh
69+
docker run -p 8000:8000 -v ./config.yaml:/config.yaml \
70+
quay.io/ohsu-comp-bio/funnel:latest server run --config /config.yaml
8071
```
8172

8273
### Podman
@@ -85,14 +76,14 @@ curl localhost:8000/service-info
8576
>
8677
> [Podman: Running a container](https://podman.io/docs#running-a-container)
8778
88-
```shell
79+
```sh
8980
podman machine init
9081
# Machine init complete
9182

9283
podman machine start
9384
# Machine "podman-machine-default" started successfully
9485

95-
podman run -p 8000:8000 -v ./example.yaml:/example.yaml quay.io/ohsu-comp-bio/funnel:latest server run --config /example.yaml
86+
podman run -p 8000:8000 -v ./config.yaml:/config.yaml quay.io/ohsu-comp-bio/funnel:latest server run --config /config.yaml
9687
# {"httpPort": "8000", "msg": "Server listening", "rpcAddress": ":9090"}
9788
```
9889

@@ -102,8 +93,8 @@ podman run -p 8000:8000 -v ./example.yaml:/example.yaml quay.io/ohsu-comp-bio/fu
10293
>
10394
> [Singularity and Docker](https://docs.sylabs.io/guides/2.6/user-guide/singularity_and_docker.html)
10495
105-
```shell
106-
singularity run --bind example.yaml:/example.yaml docker://quay.io/ohsu-comp-bio/funnel:latest server run --config /example.yaml
96+
```sh
97+
singularity run --bind config.yaml:/config.yaml docker://quay.io/ohsu-comp-bio/funnel:latest server run --config /config.yaml
10798
# INFO: Converting OCI blobs to SIF format
10899
# INFO: Starting build...
109100
# INFO: Creating SIF file...
@@ -118,7 +109,7 @@ singularity run --bind example.yaml:/example.yaml docker://quay.io/ohsu-comp-bio
118109
>
119110
> Homebrew formula source available at [github.com/ohsu-comp-bio/homebrew-formula](https://github.com/ohsu-comp-bio/homebrew-formula)
120111
121-
```shell
112+
```sh
122113
brew tap ohsu-comp-bio/formula
123114

124115
brew install funnel
@@ -130,7 +121,7 @@ brew install funnel
130121
>
131122
> Funnel requires a recent version of Go. See [development docs](../development/developers/) for more detail.
132123
133-
```shell
124+
```sh
134125
git clone https://github.com/ohsu-comp-bio/funnel.git
135126

136127
cd funnel

0 commit comments

Comments
 (0)