mirror of
https://github.com/sharevb/it-tools.git
synced 2026-11-20 21:23:08 +03:00
feat(Docker): publish an image with BASE_URL=/it-tools/
This commit is contained in:
1 parent
48397685e9
commit
d9ef06dca5
3 files changed
+36
-3
No files matched your search
@@ -62,6 +62,19 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push (BASE_URL)
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
build-args: |
|
||||
"BASE_URL=/it-tools/"
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
sharevb/it-tools:baseurl-it-tools
|
||||
ghcr.io/sharevb/it-tools:baseurl-it-tools
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
@@ -73,7 +86,6 @@ jobs:
|
||||
sharevb/it-tools:latest
|
||||
ghcr.io/${{ github.repository_owner }}/it-tools:latest
|
||||
|
||||
|
||||
# Optionally log out
|
||||
- name: Log out from GitHub Container Registry
|
||||
run: docker logout ghcr.io
|
||||
@@ -34,6 +34,21 @@ jobs:
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Build and push (BASE_URL)
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
file: ./Dockerfile
|
||||
build-args: |
|
||||
"BASE_URL=/it-tools/"
|
||||
platforms: linux/amd64,linux/arm64
|
||||
push: true
|
||||
tags: |
|
||||
sharevb/it-tools:baseurl-it-tools
|
||||
sharevb/it-tools:${{ env.RELEASE_VERSION}}-baseurl-it-tools
|
||||
ghcr.io/sharevb/it-tools:baseurl-it-tools
|
||||
ghcr.io/sharevb/it-tools:${{ env.RELEASE_VERSION}}-baseurl-it-tools
|
||||
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
|
||||
@@ -16,12 +16,18 @@ Almost [all tools PR of it-tools](https://github.com/sharevb/it-tools/pulls).
|
||||
|
||||
## Build docker image for a subfolder
|
||||
|
||||
According to https://github.com/sharevb/it-tools/pull/461#issuecomment-1602506049:
|
||||
According to https://github.com/sharevb/it-tools/pull/461#issuecomment-1602506049 and https://github.com/CorentinTh/it-tools/pull/461:
|
||||
```
|
||||
docker build -t it-tools --build-arg BASE_URL="/my-folder/" .
|
||||
docker build -t it-tools --build-arg BASE_URL="/my-folder/" .
|
||||
docker run -d --name it-tools --restart unless-stopped -p 8080:8080 it-tools
|
||||
```
|
||||
|
||||
For `/it-tools/` subfolder, you can use `baseurl-it-tools` tag:
|
||||
|
||||
```
|
||||
docker run -p 8080:8080 ghcr.io/sharevb/it-tools:baseurl-it-tools
|
||||
```
|
||||
|
||||
## Docker images
|
||||
|
||||
[GitHub Container Registry](https://github.com/sharevb/it-tools/pkgs/container/it-tools): `ghcr.io/sharevb/it-tools:latest`
|
||||
|
||||
Reference in new issue
Block a user