-
Notifications
You must be signed in to change notification settings - Fork 111
MAINT : Moved Docker images repo to docker folder in main branch #3177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
Helion55
wants to merge
16
commits into
nebari-dev:main
Choose a base branch
from
Helion55:with-docker-images-repo
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
d293562
added documention from docker repo
Helion55 3b917c2
workflow updated for docker setup
Helion55 47dfe9c
Update .pre-commit-config.yaml with new hooks from docker repo
Helion55 f5cee6e
docker directory and Dockerfiles added
Helion55 d1dfa9f
Merge branch 'main' into with-docker-images-repo
Helion55 da7e19a
with precommit
Helion55 c0614ae
Merge branch 'main' into with-docker-images-repo
Helion55 7ccf853
Merge branch 'main' into with-docker-images-repo
Helion55 ed72118
[pre-commit.ci] Apply automatic pre-commit fixes
pre-commit-ci[bot] 6dc6e74
removed documentation.yml file
Helion55 991973e
updated paths in build_push_docker.yaml file
Helion55 dbf630e
updated paths in test_images.yaml file
Helion55 0e09030
updated build-context path
Helion55 de89e76
updated test_images.yaml by adding nebari-workflow-controller under d…
Helion55 c1499f4
updated test_images.yaml with correct path of Dockerfile
Helion55 2152501
Merge branch 'main' into with-docker-images-repo
Helion55 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,123 @@ | ||
| # Build and push images to: | ||
| # GitHub Container Registry (ghcr.io) | ||
| # Red Hat Container Registry (quay.io) | ||
| name: "Build Docker Images" | ||
|
|
||
| on: | ||
| workflow_dispatch: null | ||
| push: | ||
| branches: | ||
| - "*" | ||
| paths: | ||
| - "./docker/Dockerfile" | ||
| - "./docker/dask-worker/*" | ||
| - "./docker/jupyterhub/*" | ||
| - "./docker/jupyterlab/*" | ||
| - "./docker/nebari-workflow-controller/*" | ||
|
|
||
| - "./docker/scripts/*" | ||
|
|
||
| - ".github/workflows/build-push-docker.yaml" | ||
| tags: | ||
| - "*" | ||
|
|
||
| env: | ||
| DOCKER_ORG: nebari | ||
| GPU_BASE_IMAGE: nvidia/cuda:12.8.1-base-ubuntu24.04 | ||
| GPU_IMAGE_SUFFIX: gpu | ||
| BASE_IMAGE: ubuntu:24.04 | ||
|
|
||
| permissions: | ||
| contents: read | ||
| packages: write | ||
| id-token: write | ||
| security-events: write | ||
|
|
||
| # https://docs.github.com/en/actions/using-jobs/using-concurrency | ||
| concurrency: | ||
| # only cancel in-progress jobs or runs for the current workflow - matches against branch & tags | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build-images: | ||
| name: "Build Docker Images" | ||
| runs-on: ubuntu-latest | ||
| strategy: | ||
| matrix: | ||
| dockerfile: | ||
| - jupyterlab | ||
| - jupyterhub | ||
| - dask-worker | ||
| - workflow-controller | ||
| platform: | ||
| - gpu | ||
| - cpu | ||
| exclude: | ||
| # excludes JupyterHub/GPU, Workflow Controller/GPU | ||
| - dockerfile: jupyterhub | ||
| platform: gpu | ||
| - dockerfile: workflow-controller | ||
| platform: gpu | ||
|
|
||
| steps: | ||
| - name: "Checkout Repository 🛎️" | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: "Set up Docker Buildx 🛠️" | ||
| uses: docker/setup-buildx-action@v2 | ||
|
|
||
| - name: "Login to GitHub Container Registry 🔐" | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| registry: ghcr.io | ||
| username: ${{ github.repository_owner }} | ||
| password: ${{ secrets.BOT_GHCR_TOKEN }} | ||
|
|
||
| - name: "Login to Quay Container Registry 🔐" | ||
| uses: docker/login-action@v2 | ||
| with: | ||
| registry: quay.io | ||
| username: ${{ secrets.QUAY_USERNAME }} | ||
| password: ${{ secrets.QUAY_TOKEN }} | ||
|
|
||
| - name: "Set BASE_IMAGE and Image Suffix 📷" | ||
| if: ${{ matrix.platform == 'gpu' }} | ||
| run: | | ||
| echo "GPU Platform Matrix" | ||
| echo "BASE_IMAGE=$GPU_BASE_IMAGE" >> $GITHUB_ENV | ||
| echo "IMAGE_SUFFIX=-$GPU_IMAGE_SUFFIX" >> $GITHUB_ENV | ||
|
|
||
| - name: "Generate Docker images tags 🏷️" | ||
| id: meta | ||
| uses: docker/metadata-action@v4 | ||
| with: | ||
| images: | | ||
| "quay.io/${{ env.DOCKER_ORG }}/nebari-${{ matrix.dockerfile }}${{ env.IMAGE_SUFFIX }}" | ||
| "ghcr.io/${{ github.repository_owner }}/nebari-${{ matrix.dockerfile }}${{ env.IMAGE_SUFFIX }}" | ||
| tags: | | ||
| # branch event -> e.g. `main-f0f6994-20221001` | ||
| type=ref, event=branch, suffix=-{{sha}}-{{date 'YYYYMMDD'}} | ||
| # needed for integration tests | ||
| type=ref, event=branch | ||
| # on tag push -> e.g. `2022.10.1` | ||
| type=ref, event=tag | ||
|
|
||
| - name: "Inspect image dir tree 🔍" | ||
| run: | | ||
| sudo apt-get install tree | ||
| tree . | ||
|
|
||
| - name: "Build docker images 🐳" | ||
| uses: docker/build-push-action@v3 | ||
| with: | ||
| context: ./docker/ | ||
| file: "Dockerfile" | ||
| target: ${{ matrix.dockerfile }} | ||
| tags: ${{ steps.meta.outputs.tags }} | ||
| push: ${{ github.event_name != 'pull_request' }} | ||
| labels: ${{ steps.meta.outputs.labels }} | ||
| cache-from: type=gha | ||
| cache-to: type=gha,mode=max | ||
| build-args: BASE_IMAGE=${{ env.BASE_IMAGE }} | ||
| platforms: linux/amd64,linux/arm64 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| name: Code Scanning | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| pull_request: | ||
| # The branches below must be a subset of the branches above | ||
| branches: ["main"] | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| jobs: | ||
| SAST: | ||
| permissions: | ||
| contents: read # for actions/checkout to fetch code | ||
| security-events: write # for github/codeql-action/upload-sarif to upload SARIF results | ||
| actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status | ||
| name: Trivy config Scan | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Run Trivy vulnerability scanner in config mode | ||
| uses: aquasecurity/trivy-action@master | ||
| with: | ||
| scan-type: "config" | ||
| hide-progress: true | ||
| format: "sarif" | ||
| output: "trivy-results.sarif" | ||
| ignore-unfixed: true | ||
| severity: "CRITICAL,HIGH" | ||
| limit-severities-for-sarif: true | ||
|
|
||
| - name: Upload Trivy scan results to GitHub Security tab | ||
| uses: github/codeql-action/upload-sarif@v3 | ||
| if: always() | ||
| with: | ||
| sarif_file: "trivy-results.sarif" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line 67 of this file in now out of date and should be updated.