Skip to content

Commit

Permalink
Add code notebook
Browse files Browse the repository at this point in the history
  • Loading branch information
tmetzl committed Apr 19, 2024
1 parent 25e078f commit 2ec13bd
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
39 changes: 39 additions & 0 deletions images/code-notebook/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
ARG IMAGE_SOURCE=ghcr.io/digiklausur/docker-stacks/minimal-notebook:dev
FROM $IMAGE_SOURCE

ARG CODE_VERSION=4.23.1

LABEL maintainer="e2x project H-BRS <e2x@inf.h-brs.de>"
LABEL description="e2x code notebook"
LABEL org.opencontainers.image.description="e2x code notebook"
LABEL org.opencontainers.image.authors="e2x project H-BRS <e2x@inf.h-brs.de>"

USER root
ENV CODE_VERSION=$CODE_VERSION

RUN apt-get update -y \
&& apt-get install --yes \
curl \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

RUN curl -fOL https://github.com/coder/code-server/releases/download/v$CODE_VERSION/code-server_${CODE_VERSION}_amd64.deb \
&& dpkg -i code-server_${CODE_VERSION}_amd64.deb \
&& rm -f code-server_${CODE_VERSION}_amd64.deb \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* \
&& find /usr/lib/code-server -type f -name '*.js.map' -delete \
&& npm cache clean --force



RUN mamba install -y jupyter-server-proxy -c conda-forge && \
mamba install -y jupyter-vscode-proxy -c conda-forge && \
mamba clean -afy && \
npm cache clean --force && \
find /opt/conda/ -follow -type f -name '*.js.map' -delete

USER $NB_USER



38 changes: 38 additions & 0 deletions images/code-notebook/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# e2x Code Notebook

This Docker image installs a VS code server.
This image is experimental.

## Build Args

The following build arg is available:

* `IMAGE_SOURCE`: The base image to use for the build. Defaults to `ghcr.io/digiklausur/docker-stacks/minimal-notebook:latest`.

## Description

This image adds a VS code server to the Jupyter Notebook

## Usage

### Pull and Run

To pull and run the image use:

`docker run -p 8888:8888 ghcr.io/digiklausur/docker-stacks/code-notebook:latest`

Available tags are `latest` and `dev`. Available registries are `quay.io` and `ghcr.io`.

### Build and Run

To build the image from the standard source, run:

`docker build -t code-notebook:dev .`

To build the image from a custom source, run:

`docker build -t code-notebook:dev . --build-arg="IMAGE_SOURCE=<your_base_image>:<your_tag>"`

To run the image, use:

`docker run -p 8888:8888 code-notebook:dev`

0 comments on commit 2ec13bd

Please sign in to comment.