anchor.diff:    && ln -s /opt/jdk1.${JAVA_VERSION_MAJOR}.0_${JAVA_VERSION_MINOR} ${JAVA_HOME}
   
   # install nexus
  +ENV NEXUS_VERSION=3.0.2-02
   RUN mkdir -p /opt/sonatype/nexus \
     && curl --fail --silent --location --retry 3 \
       https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz \
  
positive.code:   && chown -R root:root /opt/sonatype/nexus 
  
  ## configure nexus runtime env
  ENV NEXUS_CONTEXT ''
  RUN sed \
      -e "s|karaf.home=.|karaf.home=/opt/sonatype/nexus|g" \
      -e "s|karaf.base=.|karaf.base=/opt/sonatype/nexus|g" \
  
negative.code: USER nexus
  WORKDIR /opt/sonatype/nexus
  
  ENV JAVA_MAX_MEM=1200m \
    JAVA_MIN_MEM=1200m \
    EXTRA_JAVA_OPTS=""
  
  CMD ["bin/nexus", "run"]
  