Skip to content

Commit

Permalink
Merge pull request jupyterhub#70 from manics/fix-container-build
Browse files Browse the repository at this point in the history
Fix container build
  • Loading branch information
yuvipanda committed Nov 10, 2023
2 parents 024ab7d + 8e6a1a2 commit 64286e2
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 10 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/test.yaml
@@ -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: Test

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
@@ -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
@@ -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)
[![Test](https://github.com/jupyterhub/jupyter-remote-desktop-proxy/actions/workflows/test.yaml/badge.svg)](https://github.com/jupyterhub/jupyter-remote-desktop-proxy/actions/workflows/test.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

0 comments on commit 64286e2

Please sign in to comment.