Skip to content

Commit 6472bb5

Browse files
alexdiosoCopilot
andauthored
Update Dockerfile and README for source labeling and path changes (#21)
* Update Dockerfile and README for source labeling and repository path changes * Update README.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent d67342d commit 6472bb5

3 files changed

Lines changed: 26 additions & 7 deletions

File tree

.github/workflows/build_and_push_image.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
name: Build and Push Image
22

33
on:
4-
push:
5-
branches: [ latest ]
4+
push:
5+
tags:
6+
- 'v*.*.*'
67

78
env:
89
REGISTRY: ghcr.io
@@ -35,6 +36,14 @@ jobs:
3536
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
3637
with:
3738
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
39+
tags: |
40+
type=semver,pattern={{raw}}
41+
type=raw,value=latest
42+
labels: |
43+
org.opencontainers.image.source=https://github.com/${{ github.repository }}
44+
org.opencontainers.image.revision={{sha}}
45+
org.opencontainers.image.version={{tag}}
46+
org.opencontainers.image.created={{commit_date 'YYYY-MM-DDTHH:mm:ss.SSS[Z]'}}
3847
3948
- name: Build and push Docker image
4049
id: push

Dockerfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Use an official Python runtime as a parent image
22
FROM python:3.14.4-slim-trixie
33

4+
LABEL org.opencontainers.image.source="https://github.com/SASlabgroup/microSWIFT-Dashboard"
5+
46
# Set the working directory in the container
57
WORKDIR /app
68

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,24 @@ podman compose up
6565
## Running a pre-built container
6666
To run a pre-built container in Docker:
6767
```shell
68-
docker pull ghcr.io/apl-uw-software/microswift-dashboard:latest
69-
docker run -p 8080:8080 ghcr.io/apl-uw-software/microswift-dashboard:latest
68+
docker pull ghcr.io/saslabgroup/microswift-dashboard:latest
69+
docker run -p 8080:8080 ghcr.io/saslabgroup/microswift-dashboard:latest
7070
```
7171

72-
To run a pre-build container in Podman:
72+
To run a pre-built container in Podman:
7373
```shell
74-
podman pull ghcr.io/apl-uw-software/microswift-dashboard:latest
75-
podman run -p 8080:8080 ghcr.io/apl-uw-software/microswift-dashboard:latest
74+
podman pull ghcr.io/saslabgroup/microswift-dashboard:latest
75+
podman run -p 8080:8080 ghcr.io/saslabgroup/microswift-dashboard:latest
7676
```
7777

78+
For automated dependency updates in downstream repositories, pin immutable release tags instead of latest:
79+
80+
```shell
81+
ghcr.io/saslabgroup/microswift-dashboard:v1.2.3
82+
```
83+
84+
Release tags are published from stable Git tags in this repository using the format vX.Y.Z.
85+
7886
# Deployment
7987
While Dash recommends using Heroku for deployment, we suggest using Render for its simplicity. For deployment on Render, follow their <a href="https://github.com/thusharabandara/dash-app-render-deployment">deployment guide</a>. <b>Note:</b> You will need to create a Render account.
8088

0 commit comments

Comments
 (0)