-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from kincl/jkincl-add-novnc
Adding support for running noVNC in same pod as showroom
- Loading branch information
Showing
7 changed files
with
150 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,56 @@ | ||
--- | ||
name: build-image-novnc | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
tags: | ||
- "v*" | ||
paths: | ||
- "images/showroom-novnc/**" | ||
|
||
permissions: | ||
packages: write | ||
|
||
concurrency: | ||
group: build | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: set datetime | ||
run: | | ||
echo "datetime=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_ENV | ||
- name: Build image | ||
id: build-image | ||
uses: redhat-actions/buildah-build@v2 | ||
with: | ||
image: showroom-novnc | ||
tags: latest ${{ github.ref_name }} | ||
context: images/showroom-novnc/ | ||
containerfiles: | | ||
./images/showroom-novnc/Containerfile | ||
build-args: | | ||
CREATED_AT=${{ env.datetime }} | ||
GITHUB_SHA=${{ github.sha }} | ||
- name: push image to ghcr.io | ||
id: push-to-ghcr | ||
uses: redhat-actions/push-to-registry@v2 | ||
with: | ||
image: ${{ steps.build-image.outputs.image }} | ||
tags: ${{ steps.build-image.outputs.tags }} | ||
registry: ghcr.io/rhpds | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
||
- name: Print image url | ||
run: echo "Image pushed to ${{ steps.push-to-ghcr.outputs.registry-paths }}" |
This file contains 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 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 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 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 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 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,20 @@ | ||
FROM registry.access.redhat.com/ubi9:9.2-722 | ||
|
||
ARG CREATED_AT=none | ||
ARG GITHUB_SHA=none | ||
|
||
LABEL org.opencontainers.image.created="$CREATED_AT" | ||
LABEL org.opencontainers.image.revision="$GITHUB_SHA" | ||
|
||
RUN curl -L https://github.com/novnc/websockify/archive/refs/tags/v0.11.0.tar.gz \ | ||
--output websockify.tar.gz && \ | ||
tar xzf websockify.tar.gz && \ | ||
cd /websockify-0.11.0 && python3 setup.py install | ||
|
||
RUN curl -L https://github.com/novnc/noVNC/archive/refs/tags/v1.4.0.tar.gz \ | ||
--output noVNC.tar.gz && \ | ||
mkdir -p /www/novnc && \ | ||
tar xzf noVNC.tar.gz --strip-components 1 -C /www/novnc | ||
|
||
# | ||
CMD ["websockify"] |