diff --git a/README.md b/README.md index 0851937..cc7a44e 100644 --- a/README.md +++ b/README.md @@ -60,7 +60,7 @@ The IllumiDesk docker layers for grader images are illustrated below: - **THEIA IDE**: basic version of the THEIA IDE. `THEIA` is highly configurable, refer to [their documention](https://github.com/eclipse-theia/theia#documentation) for customization options (mostly done via package.json modifications). - **VS Code**: this image contains the `code-server` VS Code distribution optimized for `docker`. -- **RStudio**: uses [`binder-examples/r-conda`](https://github.com/binder-examples/r-conda) as a base image. +- **RStudio**: uses [`illumidesk/r-conda`](https://github.com/illumidesk/r-conda) as a base image. The IllumiDesk docker layers for workspace types are illustrated below: @@ -71,9 +71,7 @@ The IllumiDesk docker layers for workspace types are illustrated below: 1. Build and tag the base image ```bash - docker build -t illumidesk/datascience-notebook:latest \ - -f notebooks/Dockerfile.base \ - notebooks/. + make build/base-image ``` 2. Use the base image from step 1 above as: @@ -81,15 +79,17 @@ The IllumiDesk docker layers for workspace types are illustrated below: a) A base image and add additional layers to said image to create your own custom image ``` -FROM illumidesk/datascience-notebook:latest +FROM illumidesk/base-notebook:latest RUN ... ``` +or + b) A source image for files necessary to use image with the [IllumiDesk](https://github.com/IllumiDesk/illumidesk) stack. ``` -FROM illumidesk/datascience-notebook:latest AS base +FROM illumidesk/base-notebook:latest AS base FROM acme/image:tag @@ -102,6 +102,24 @@ RUN ... 3. Push images to DockerHub +```bash +docker push organization/custom-image +``` + +## Testing + +Tests start the docker container(s), runs commands by emulating the `docker exec ...` command, and asserts the outputs. You can run tests on one image or all images: + +```bash +make test/base-notebook +``` + +or + +```bash +make test-all +``` + ## References These images are based on the `jupyter/docker-stacks` images. [Refer to their documentation](https://jupyter-docker-stacks.readthedocs.io/en/latest/) for the full set of configuration options. diff --git a/base-notebook/test/test_languages.py b/base-notebook/test/test_languages.py index a588e4b..98938f6 100644 --- a/base-notebook/test/test_languages.py +++ b/base-notebook/test/test_languages.py @@ -12,9 +12,9 @@ @pytest.mark.parametrize( 'language,version_output', [ - ('java', ['openjdk', '11.0.7', '2020-04-14\nOpenJDK',],), + ('java', ['openjdk', '11.0.8', '2020-07-14\nOpenJDK',],), ('julia', ['julia', 'version', '1.4.1\n']), - ('python', ['Python', '3.7.6\n']), + ('python', ['Python', '3.7.8\n']), ('R', ['R', 'version', '3.6.3',],), ], ) diff --git a/theia/Dockerfile b/theia/Dockerfile index 6989a4a..a7832b9 100644 --- a/theia/Dockerfile +++ b/theia/Dockerfile @@ -49,14 +49,11 @@ USER root WORKDIR /tmp -# Set the SHELL to bash with pipefail option -SHELL ["/bin/bash", "-o", "pipefail", "-c"] - COPY --from=builder /theia-app/illumidesk-theia_0.0.2_all.deb /tmp/ RUN curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash - \ && apt-get install -y /tmp/illumidesk-theia_0.0.2_all.deb \ && rm /tmp/illumidesk-theia_0.0.2_all.deb - + ## NVM # https://stackoverflow.com/questions/25899912/how-to-install-nvm-in-docker @@ -71,15 +68,20 @@ RUN mkdir -p $NVM_DIR \ && nvm alias default "${NODE_VERSION}" \ && nvm use default -USER $NB_USER +USER "${NB_USER}" -WORKDIR $HOME +WORKDIR "${HOME}" COPY requirements.txt requirements.txt RUN python3 -m pip install -r requirements.txt \ - && rm requirements.txt \ - && fix-permissions "${CONDA_DIR}" \ - && fix-permissions "/home/${NB_USER}" + && rm requirements.txt + +# fix conda and home directory permissions as root +USER root +RUN fix-permissions "${CONDA_DIR}" \ + && fix-permissions "${HOME}" + +USER "${NB_USER}" RUN jupyter serverextension enable --sys-prefix --py jupyter_server_proxy \ && jupyter labextension install @jupyterlab/server-proxy \ diff --git a/theia/requirements.txt b/theia/requirements.txt index 375acf4..0aa9a88 100644 --- a/theia/requirements.txt +++ b/theia/requirements.txt @@ -1,5 +1,5 @@ autopep8==1.5.3 flake8==3.8.3 -illumidesk-theia-proxy==0.1.3 +illumidesk-theia-proxy==0.1.5 jupyter-server-proxy==1.5.0 python-language-server==0.33.3