2019-05-12 05:29:45 +00:00
|
|
|
FROM alpine:3.9
|
|
|
|
|
|
|
|
# https://github.com/cavemandaveman/nexus
|
|
|
|
|
|
|
|
LABEL maintainer="cavemandaveman <cavemandaveman@protonmail.com>"
|
|
|
|
|
|
|
|
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 \
|
2019-05-12 05:55:53 +00:00
|
|
|
nss \
|
2019-05-12 05:29:45 +00:00
|
|
|
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
|
|
|
|
|
2019-05-12 05:55:53 +00:00
|
|
|
COPY bin/docker-entrypoint.sh /
|
|
|
|
RUN set -x \
|
|
|
|
&& chmod +x /docker-entrypoint.sh
|
|
|
|
|
2019-05-12 05:29:45 +00:00
|
|
|
EXPOSE 5000 8081 8443
|
|
|
|
|
|
|
|
WORKDIR "${NEXUS_HOME}"
|
|
|
|
|
|
|
|
VOLUME "${NEXUS_DATA}"
|
|
|
|
|
|
|
|
ENTRYPOINT ["/docker-entrypoint.sh"]
|
|
|
|
|
|
|
|
CMD ["bin/nexus", "run"]
|