anchor.diff:  # customization.
   
   # Install our custom.js
  -COPY resources/custom.js /home/jovyan/.jupyter/custom/
  +COPY resources/custom.js /home/$NB_USER/.jupyter/custom/
   
   # Add the templates
   COPY resources/templates/ /srv/templates/
  
positive.code: RUN gem update --system --no-document && \
      gem install --no-document 'activemodel:~> 4.2' sciruby-full
  
  # Now switch to jovyan for all conda and other package manager installs
  USER jovyan
  
  ENV PATH /home/jovyan/.cabal/bin:/opt/cabal/1.22/bin:/opt/ghc/7.8.4/bin:/opt/happy/1.19.4/bin:/opt/alex/3.1.3/bin:$PATH
  
  # IRuby
  RUN iruby register
  
negative.code: 
  # Clone featured notebooks before adding local content to avoid recloning
  # everytime something changes locally
  RUN mkdir -p /home/$NB_USER/work/communities && \
      mkdir -p /home/$NB_USER/work/featured
  RUN git clone --depth 1 https://github.com/jvns/pandas-cookbook.git /home/$NB_USER/work/featured/pandas-cookbook/
  RUN git clone --depth 1 https://github.com/gibiansky/IHaskell.git /home/$NB_USER/work/IHaskell/ && \
      mv /home/$NB_USER/work/IHaskell/ihaskell-display/ihaskell-widgets/Examples /home/$NB_USER/work/featured/ihaskell-widgets && \
      rm -r /home/$NB_USER/work/IHaskell
  
  # Add local content, starting with notebooks and datasets which are the largest
  # so that later, smaller file changes do not cause a complete recopy during 
  # build
  COPY notebooks/ /home/$NB_USER/work/
  COPY datasets/ /home/$NB_USER/work/datasets/
  
  # Switch back to root for permission fixes, conversions, and trust. Make sure
  # trust is done as $NB_USER so that the signing secret winds up in the $NB_USER
  # profile, not root's
  USER root
  
  # Convert notebooks to the current format and trust them
  RUN find /home/$NB_USER/work -name '*.ipynb' -exec jupyter nbconvert --to notebook {} --output {} \; && \
      chown -R $NB_USER:users /home/$NB_USER && \
      sudo -u $NB_USER env "PATH=$PATH" find /home/$NB_USER/work -name '*.ipynb' -exec jupyter trust {} \;
  
  # Finally, add the site specific tmpnb.org / try.jupyter.org configuration.
  # These should probably be split off into a separate docker image so that others
  