James Black James Black - 1 month ago 16
TypeScript Question

Building docker image with angular 2, jupyter and typescript

I want to write an interactive tutorial to teach a team how to use Typescript and Angular 2, but I don't want everyone to install Jupyter.

So, I want to build a docker image that has everything needed.

This is my Dockerfile so far, but I am not certain where to copy the package.json from Quickstart so

npm install
will find it, do the installation and have Jupyter find it.

FROM jupyter/minimal-notebook

MAINTAINER Jupyter Project <jupyter@googlegroups.com>

USER root

RUN apt-get update && \
apt-get install -y --no-install-recommends && \
apt-get install -y npm nodejs nodejs-legacy wget locales git \
fonts-dejavu \
gcc && apt-get clean && \
rm -rf /var/lib/apt/lists/*

RUN npm install --save jupyter-js-plugins

USER $NB_USER


I want to add this plugin from github for Typescript.

Another option is to just copy the files to the docker image, but where would they be copied in order to be found by Jupyter?

Answer

You can copy the package.json anywhere as long as you set the WORKDIR before running NPM install.

COPY . /src
WORKDIR /src
RUN npm install