anchor.diff:          "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
           "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
           "$ALPINE_GLIBC_BASE_URL/$ALPINE_GLIBC_PACKAGE_VERSION/$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \
  -    && apk add --no-cache \
  +    && apk add \
           "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
           "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
           "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \
  -    && rm "/etc/apk/keys/sgerrand.rsa.pub" \
  +    && rm /etc/apk/keys/sgerrand.rsa.pub \
       && /usr/glibc-compat/bin/localedef --force --inputfile POSIX --charmap UTF-8 C.UTF-8 || true \
       && echo "export LANG=C.UTF-8" > /etc/profile.d/locale.sh \
  -    && rm "/root/.wget-hsts" \
  +    && rm /root/.wget-hsts \
       && rm \
           "$ALPINE_GLIBC_BASE_PACKAGE_FILENAME" \
           "$ALPINE_GLIBC_BIN_PACKAGE_FILENAME" \
           "$ALPINE_GLIBC_I18N_PACKAGE_FILENAME" \
       && wget --header "Cookie: oraclelicense=accept-securebackup-cookie;" \
  -        "http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION}u${JAVA_UPDATE}-b${JAVA_BUILD}/jdk-${JAVA_VERSION}u${JAVA_UPDATE}-linux-x64.tar.gz" \
  +        "http://download.oracle.com/otn-pub/java/jdk/${JAVA_VERSION}u${JAVA_UPDATE}-b${JAVA_BUILD}/${JAVA_PATH}/jdk-${JAVA_VERSION}u${JAVA_UPDATE}-linux-x64.tar.gz" \
       && tar -xzf "jdk-${JAVA_VERSION}u${JAVA_UPDATE}-linux-x64.tar.gz" \
       && mkdir -p "/usr/lib/jvm" \
  -    && mv "/tmp/jdk1.${JAVA_VERSION}.0_${JAVA_UPDATE}" "/usr/lib/jvm/java-${JAVA_VERSION}-oracle" \
  +    && mv "jdk1.${JAVA_VERSION}.0_${JAVA_UPDATE}" "/usr/lib/jvm/java-${JAVA_VERSION}-oracle" \
       && ln -s "java-${JAVA_VERSION}-oracle" "$JAVA_HOME" \
       && ln -s "$JAVA_HOME/bin/"* "/usr/bin/" \
       && rm -rf "$JAVA_HOME/"*src.zip \
  
positive.code: 
  MAINTAINER mritd <mritd@mritd.me>
  
  ENV LANG=C.UTF-8
  ENV TZ='Asia/Shanghai'
  ENV JAVA_VERSION=8
  ENV JAVA_UPDATE=112
  ENV JAVA_BUILD=15
  ENV JAVA_HOME='/usr/lib/jvm/default-jvm'
  ENV RESIN_VERSION=4.0.49
  
  # install glibc
  RUN ALPINE_GLIBC_BASE_URL="https://github.com/sgerrand/alpine-pkg-glibc/releases/download" \
      && ALPINE_GLIBC_PACKAGE_VERSION="2.23-r3" \
      && ALPINE_GLIBC_BASE_PACKAGE_FILENAME="glibc-$ALPINE_GLIBC_PACKAGE_VERSION.apk" \
      && ALPINE_GLIBC_BIN_PACKAGE_FILENAME="glibc-bin-$ALPINE_GLIBC_PACKAGE_VERSION.apk" \
      && ALPINE_GLIBC_I18N_PACKAGE_FILENAME="glibc-i18n-$ALPINE_GLIBC_PACKAGE_VERSION.apk" \
      && apk add --no-cache bash tzdata \
      && apk add --no-cache --virtual=.build-dependencies \
          wget \
          make \
          gcc \
          ca-certificates \
          libc-dev \
          openssl-dev \
  
negative.code:            "$JAVA_HOME/jre/lib/amd64/libglass.so" \
             "$JAVA_HOME/jre/lib/amd64/libgstreamer-lite.so" \
             "$JAVA_HOME/jre/lib/amd64/"libjavafx*.so \
             "$JAVA_HOME/jre/lib/amd64/"libjfx*.so \
      && wget --header "Cookie: oraclelicense=accept-securebackup-cookie;" \
          "http://download.oracle.com/otn-pub/java/jce/${JAVA_VERSION}/jce_policy-${JAVA_VERSION}.zip" \
      && unzip -jo -d "${JAVA_HOME}/jre/lib/security" "jce_policy-${JAVA_VERSION}.zip" \
      && rm "${JAVA_HOME}/jre/lib/security/README.txt" \
      && rm jdk-${JAVA_VERSION}u${JAVA_UPDATE}-linux-x64.tar.gz \
      && wget http://www.caucho.com/download/resin-$RESIN_VERSION.tar.gz \
      && tar -zxvf resin-$RESIN_VERSION.tar.gz \
      && (cd resin-$RESIN_VERSION \
      && ./configure --prefix=/usr/local/resin-$RESIN_VERSION \
              --with-java-home=$JAVA_HOME \
              --enable-64bit \
      && make && make install) \
      && ln -s "/usr/local/resin-$RESIN_VERSION/bin/"* "/usr/bin/" \
      && ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
      && echo "Asia/Shanghai" > /etc/timezone \
      && apk del .build-dependencies glibc-i18n \
      && rm -rf resin-$RESIN_VERSION* \
      && rm -rf /tmp/* \
      && rm -rf /var/cache/apk/*
  
  CMD ["resin.sh","console"]
  