anchor.diff:  ARG SRC_PATH=./
   
   # Copy the app to the image
  -COPY ${SRC_PATH} ./app
  +COPY ${SRC_PATH} /home/wekan/app
   
   RUN \
  +    # Add non-root user wekan
  +    useradd --user-group --system --home-dir /home/wekan wekan && \
  +    \
       # OS dependencies
  -    apt-get update -y && apt-get install -y ${BUILD_DEPS} && \
  +    apt-get update -y && apt-get install -y --no-install-recommends ${BUILD_DEPS} && \
  +    \
  +    # Gosu installation
  +    GOSU_ARCHITECTURE="$(dpkg --print-architecture | awk -F- '{ print $NF }')" && \
  +    wget -O /usr/local/bin/gosu "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCHITECTURE}" && \
  +    wget -O /usr/local/bin/gosu.asc "https://github.com/tianon/gosu/releases/download/${GOSU_VERSION}/gosu-${GOSU_ARCHITECTURE}.asc" && \
  +    export GNUPGHOME="$(mktemp -d)" && \
  +    gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 && \
  +    gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu && \
  +    rm -R "$GNUPGHOME" /usr/local/bin/gosu.asc && \
  +    chmod +x /usr/local/bin/gosu && \
       \
       # Download nodejs
       wget https://nodejs.org/dist/${NODE_VERSION}/node-${NODE_VERSION}-${ARCHITECTURE}.tar.gz && \
  
positive.code: FROM debian:wheezy
  MAINTAINER wefork
  
  ENV BUILD_DEPS="wget curl bzip2 build-essential python git"
  ARG NODE_VERSION=v0.10.48
  ARG METEOR_RELEASE=1.3.5.1
  ARG NPM_VERSION=3.10.10
  
negative.code:     npm install -g node-gyp && \
      npm install -g fibers && \
      \
      # Change user to wekan and install meteor
      cd /home/wekan/ && \
      chown wekan:wekan --recursive /home/wekan && \
      curl https://install.meteor.com -o ./install_meteor.sh && \
      sed -i "s|RELEASE=.*|RELEASE=${METEOR_RELEASE}\"\"|g" ./install_meteor.sh && \
      echo "Starting meteor ${METEOR_RELEASE} installation...   \n" && \
      chown wekan:wekan ./install_meteor.sh && \
      gosu wekan:wekan sh ./install_meteor.sh && \
      \
      # Build app
      cd /home/wekan/app && \
      gosu wekan /home/wekan/.meteor/meteor npm install --save xss && \
      gosu wekan /home/wekan/.meteor/meteor build --directory /home/wekan/app_build && \
      cd /home/wekan/app_build/bundle/programs/server/ && \
      gosu wekan npm install && \
      mv /home/wekan/app_build/bundle /build && \
      cd /build && \
      \
      # Cleanup
      apt-get remove --purge -y ${BUILD_DEPS} && \
      apt-get autoremove -y && \
      rm -R /var/lib/apt/lists/* && \
      rm -R /home/wekan/.meteor && \
      rm -R /home/wekan/app && \
      rm -R /home/wekan/app_build && \
      rm /home/wekan/install_meteor.sh
  
  ENV PORT=80
  
  