FROM alpine:3.9 # https://github.com/cavemandaveman/nexus LABEL maintainer="cavemandaveman " ENV SONATYPE_DIR="/opt/sonatype" ENV NEXUS_VERSION="3.16.1-02" \ NEXUS_HOME="${SONATYPE_DIR}/nexus" \ NEXUS_DATA="/nexus-data" \ SONATYPE_WORK=${SONATYPE_DIR}/sonatype-work \ JAVA_MIN_MEM="1200M" \ JAVA_MAX_MEM="1200M" \ JKS_PASSWORD="changeit" RUN set -x \ && apk --no-cache add \ openjdk8-jre-base \ libressl \ nss \ su-exec \ && mkdir -p "${SONATYPE_DIR}" \ && wget -qO - "https://download.sonatype.com/nexus/3/nexus-${NEXUS_VERSION}-unix.tar.gz" \ | tar -zxC "${SONATYPE_DIR}" \ && mv "${SONATYPE_DIR}/nexus-${NEXUS_VERSION}" "${NEXUS_HOME}" \ && adduser -S -h ${NEXUS_DATA} nexus COPY bin/docker-entrypoint.sh / RUN set -x \ && chmod +x /docker-entrypoint.sh EXPOSE 5000 8081 8443 WORKDIR "${NEXUS_HOME}" VOLUME "${NEXUS_DATA}" ENTRYPOINT ["/docker-entrypoint.sh"] CMD ["bin/nexus", "run"]