Skip to content

Commit e2046ac

Browse files
authored
Merge pull request #2 from nmfs-opensci/copilot/fix-hardcoded-values
Remove hardcoded repository references from template
2 parents 6a5d80b + 8141bdb commit e2046ac

5 files changed

Lines changed: 18 additions & 3 deletions

File tree

.github/actions/build-and-push/action.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ runs:
7272
docker build ${{ env.dir }} \
7373
-f ${{ env.dir }}/Dockerfile \
7474
--build-arg GITHUB_PAT=${{ inputs.github_token }} \
75+
--build-arg REPO_URL=https://github.com/${{ github.repository }} \
7576
--tag ghcr.io/${{ github.repository_owner }}/${{ env.name }}:${{ env.tag }} \
7677
--tag ghcr.io/${{ github.repository_owner }}/${{ env.name }}:latest
7778

.github/workflows/build-and-push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,5 +28,5 @@ jobs:
2828
uses: ./.github/actions/build-and-push
2929
with:
3030
image_dir: .
31-
image_name: container-images/py-rocket-template
31+
# image_name defaults to repository name if not specified
3232
github_token: ${{ secrets.GITHUB_TOKEN }}

Dockerfile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
FROM ghcr.io/nmfs-opensci/py-rocket-base:2026.02.07
22

3+
ARG REPO_URL=https://github.com/OWNER/REPO
4+
35
LABEL org.opencontainers.image.maintainers="your.name"
46
LABEL org.opencontainers.image.author="your.name"
5-
LABEL org.opencontainers.image.source=https://github.com/nmfs-opensci/py-rocket-template
7+
LABEL org.opencontainers.image.source=${REPO_URL}
68
LABEL org.opencontainers.image.description="Python (3.11) and R (4.5.1) image template"
79
LABEL org.opencontainers.image.licenses=Apache2.0
810
LABEL org.opencontainers.image.version=2026.02.10

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,14 @@
11
# py-rocket-template
22
A template for using py-rocket-base for creating Docker image for JupyterHubs
3+
4+
## Using this template
5+
6+
When you use this template to create your own repository:
7+
8+
1. Update the `environment.yml` file with your conda packages
9+
2. Update the `install.R` file with your R packages
10+
3. Update the `apt.txt` file with any system packages
11+
4. Update the Dockerfile labels (maintainers, author, description)
12+
5. The Docker image will be automatically built and pushed to GitHub Container Registry when you push changes to main
13+
14+
The image name will automatically be set to your repository name.

environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: py-rocket-template
1+
name: notebook
22
channels:
33
- conda-forge
44
- nodefaults

0 commit comments

Comments
 (0)