anchor.diff:  RUN echo "ErrorDocument 404 /index.html" >>/usr/local/apache2/conf/httpd.conf
   
   # Copy the distribution unto htdocs
  -COPY --from=webpack /opt/build/dist /usr/local/apache2/htdocs/
  +COPY --from=build /opt/build/dist /usr/local/apache2/htdocs/
  
positive.code: ADD .eslintrc /usr/local/babel/.eslintrc
  
  # ======================================================================
  # Import sources
  FROM dependencies as sources
  WORKDIR /opt/build
  ADD src src
  
  # ======================================================================
  # Run eslint over sources
  FROM sources as eslint
  WORKDIR /opt/build
  RUN eslint $(pwd)/src
  
  # ======================================================================
  # Run babel on sources
  FROM sources as babel
  WORKDIR /opt/build
  RUN babel $(pwd)/src $(pwd)/build
  
  # ======================================================================
  # Run webpack on output
  FROM babel as webpack
  ARG environment
  
  WORKDIR /opt/build
  
  # Copy static content into the final distribution
  ADD public dist
  
  # The CSS
  ADD css css
  RUN cat css/*.css >>dist/main.css
  
  # Finally run webpack
  ADD webpack.config.js webpack.config.js
  RUN environment=${environment} webpack --config webpack.config.js
  
  # Now caching, rename main.js to main-{hash}.js
  RUN MAIN="main-$(sha256sum dist/main.js | cut -c-16).js" &&\
      CSS="main-$(sha256sum dist/main.css | cut -c-16).css" &&\
      mv dist/main.js dist/$MAIN &&\
      mv dist/main.css dist/$CSS &&\
      sed \
        -e "s/main.js/$MAIN/g" \
        -e "s/main.css/$CSS/g" \
        -i dist/index.html
  
  # ======================================================================
  # Apache HTTPD based image to run the app locally
  
negative.code: # ======================================================================
  # The base builder image comprising babel, webpack and all required
  # dependencies from npm
  FROM area51/babel:react-latest as base
  
  WORKDIR /opt/build
  ADD package.json package.json
  