Skip to content

Commit

Permalink
Merge pull request #165 from nmfs-opensci/eeholmes-patch-1
Browse files Browse the repository at this point in the history
Eeholmes patch 1
  • Loading branch information
eeholmes authored Nov 13, 2024
2 parents b2cfbd8 + 0a9ba2b commit b14e029
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 3 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/test-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Docker Image CI coastwatch
on:
workflow_dispatch: null
push:
branches: test

jobs:
build:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
with:
ref: test

- name: Login to GitHub Container Registry
if: github.repository == 'nmfs-opensci/py-rocket-base'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{github.actor}}
password: ${{secrets.GITHUB_TOKEN}}
- name: Build the Docker image
if: github.repository == 'nmfs-opensci/py-rocket-base'
run: |
docker build . -f Dockerfile --tag ghcr.io/nmfs-opensci/py-rocket-base/test:latest
- name: Publish
if: github.repository == 'nmfs-opensci/py-rocket-base'
run: |
docker push ghcr.io/nmfs-opensci/py-rocket-base/test:latest
11 changes: 8 additions & 3 deletions appendix → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
USER root
FROM pangeo/base-notebook

ENV REPO_DIR="/srv/repo"
COPY . ${REPO_DIR}
RUN chgrp -R staff ${REPO_DIR} && \
chmod -R g+rwx ${REPO_DIR} && \
rm -rf ${REPO_DIR}/book ${REPO_DIR}/docs

# Clean up extra files in ${REPO_DIR}
RUN rm -rf ${REPO_DIR}/book ${REPO_DIR}/docs
USER root

# repo2docker does not set this. This is the default env in repo2docker type images
ENV CONDA_ENV=notebook
Expand Down

0 comments on commit b14e029

Please sign in to comment.