Skip to content

Commit d9ef06d

Browse files
committed
feat(Docker): publish an image with BASE_URL=/it-tools/
1 parent 4839768 commit d9ef06d

3 files changed

Lines changed: 36 additions & 3 deletions

File tree

.github/workflows/sharevb-docker-realease.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,19 @@ jobs:
6262
- name: Set up Docker Buildx
6363
uses: docker/setup-buildx-action@v3
6464

65+
- name: Build and push (BASE_URL)
66+
uses: docker/build-push-action@v5
67+
with:
68+
context: .
69+
file: ./Dockerfile
70+
build-args: |
71+
"BASE_URL=/it-tools/"
72+
platforms: linux/amd64,linux/arm64
73+
push: true
74+
tags: |
75+
sharevb/it-tools:baseurl-it-tools
76+
ghcr.io/sharevb/it-tools:baseurl-it-tools
77+
6578
- name: Build and push
6679
uses: docker/build-push-action@v5
6780
with:
@@ -73,7 +86,6 @@ jobs:
7386
sharevb/it-tools:latest
7487
ghcr.io/${{ github.repository_owner }}/it-tools:latest
7588
76-
7789
# Optionally log out
7890
- name: Log out from GitHub Container Registry
7991
run: docker logout ghcr.io

.github/workflows/sharevb-releases.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,21 @@ jobs:
3434
- name: Set up Docker Buildx
3535
uses: docker/setup-buildx-action@v3
3636

37+
- name: Build and push (BASE_URL)
38+
uses: docker/build-push-action@v5
39+
with:
40+
context: .
41+
file: ./Dockerfile
42+
build-args: |
43+
"BASE_URL=/it-tools/"
44+
platforms: linux/amd64,linux/arm64
45+
push: true
46+
tags: |
47+
sharevb/it-tools:baseurl-it-tools
48+
sharevb/it-tools:${{ env.RELEASE_VERSION}}-baseurl-it-tools
49+
ghcr.io/sharevb/it-tools:baseurl-it-tools
50+
ghcr.io/sharevb/it-tools:${{ env.RELEASE_VERSION}}-baseurl-it-tools
51+
3752
- name: Build and push
3853
uses: docker/build-push-action@v5
3954
with:

README.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,18 @@ Almost [all tools PR of it-tools](https://github.com/sharevb/it-tools/pulls).
1616

1717
## Build docker image for a subfolder
1818

19-
According to https://github.com/sharevb/it-tools/pull/461#issuecomment-1602506049:
19+
According to https://github.com/sharevb/it-tools/pull/461#issuecomment-1602506049 and https://github.com/CorentinTh/it-tools/pull/461:
2020
```
21-
docker build -t it-tools --build-arg BASE_URL="/my-folder/" .
21+
docker build -t it-tools --build-arg BASE_URL="/my-folder/" .
2222
docker run -d --name it-tools --restart unless-stopped -p 8080:8080 it-tools
2323
```
2424

25+
For `/it-tools/` subfolder, you can use `baseurl-it-tools` tag:
26+
27+
```
28+
docker run -p 8080:8080 ghcr.io/sharevb/it-tools:baseurl-it-tools
29+
```
30+
2531
## Docker images
2632

2733
[GitHub Container Registry](https://github.com/sharevb/it-tools/pkgs/container/it-tools): `ghcr.io/sharevb/it-tools:latest`

0 commit comments

Comments
 (0)