Skip to content
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

Fix container build #70

Merged
merged 5 commits into from
Nov 10, 2023
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# This is a GitHub workflow defining a set of jobs with a set of steps.
# ref: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
#
name: Build
manics marked this conversation as resolved.
Show resolved Hide resolved

on:
pull_request:
push:
branches-ignore:
- "dependabot/**"
- "pre-commit-ci-update-config"
tags: ["**"]
workflow_dispatch:

jobs:
container:
runs-on: ubuntu-22.04
timeout-minutes: 10

steps:
- uses: actions/checkout@v4

- name: Build image
run: |
docker build -t jupyter-remote-desktop-proxy .

- name: Smoke test image
run: |
docker run -d -p 8888:8888 -e JUPYTER_TOKEN=secret jupyter-remote-desktop-proxy
sleep 10
curl 'http://localhost:8888/desktop/?token=secret' | grep 'Modified from novnc_lite.html example in noVNC'

# TODO: Check VNC desktop works, e.g. by comparing Playwright screenshots
# https://playwright.dev/docs/test-snapshots
21 changes: 11 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FROM jupyter/base-notebook
FROM quay.io/jupyter/base-notebook:latest

USER root

RUN apt-get -y -q update \
&& apt-get -y -q install \
RUN apt-get -y -qq update \
&& apt-get -y -qq install \
dbus-x11 \
xfce4 \
xfce4-panel \
Expand All @@ -15,15 +15,16 @@ RUN apt-get -y -q update \
tigervnc-xorg-extension \
# chown $HOME to workaround that the xorg installation creates a
# /home/jovyan/.cache directory owned by root
&& chown -R $NB_UID:$NB_GID $HOME \
# Create /opt/install to ensure it's writable by pip
&& mkdir -p /opt/install \
&& chown -R $NB_UID:$NB_GID $HOME /opt/install \
&& rm -rf /var/lib/apt/lists/*

USER $NB_USER

RUN mamba install --yes websockify
COPY --chown=$NB_UID:$NB_GID jupyter_remote_desktop_proxy /opt/install/jupyter_remote_desktop_proxy
COPY --chown=$NB_UID:$NB_GID environment.yml setup.py MANIFEST.in README.md LICENSE /opt/install/

COPY --chown=$NB_USER:$NB_USER jupyter_remote_desktop_proxy /opt/install/jupyter_remote_desktop_proxy
COPY --chown=$NB_USER:$NB_USER setup.py MANIFEST.in README.md LICENSE /opt/install/

RUN cd /opt/install \
&& pip install -e .
RUN cd /opt/install && \
. /opt/conda/bin/activate && \
mamba env update --quiet --file environment.yml
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Jupyter Remote Desktop Proxy

[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/jupyterhub/jupyter-remote-desktop-proxy/HEAD?urlpath=desktop)
[![Build](https://github.com/jupyterhub/jupyter-remote-desktop-proxy/actions/workflows/build.yaml/badge.svg)](https://github.com/jupyterhub/jupyter-remote-desktop-proxy/actions/workflows/build.yaml)
[![Latest PyPI version](https://img.shields.io/pypi/v/jupyter-remote-desktop-proxy?logo=pypi)](https://pypi.python.org/pypi/jupyter-remote-desktop-proxy)
[![Issue tracking - GitHub](https://img.shields.io/badge/issue_tracking-github-blue?logo=github)](https://github.com/jupyterhub/jupyter-remote-desktop-proxy/issues)
[![Help forum - Discourse](https://img.shields.io/badge/help_forum-discourse-blue?logo=discourse)](https://discourse.jupyter.org/c/jupyterhub)
Expand Down