-
Notifications
You must be signed in to change notification settings - Fork 29
/
Dockerfile
46 lines (34 loc) · 1.5 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
FROM sonatype/nexus3
LABEL maintainer="Brad Beck <[email protected]>"
ENV NEXUS_SSL=${NEXUS_HOME}/etc/ssl
ENV PUBLIC_CERT=${NEXUS_SSL}/cacert.pem \
PUBLIC_CERT_SUBJ=/CN=localhost \
PRIVATE_KEY=${NEXUS_SSL}/cakey.pem \
PRIVATE_KEY_PASSWORD=password
ARG GOSU_VERSION=1.13
USER root
RUN sed -e '/^enabled=1/ s/=1/=0/' -i /etc/yum/pluginconf.d/subscription-manager.conf \
&& yum -y update && yum install -y openssl libxml2 libxslt && yum clean all
RUN set -eux;\
curl -o /usr/local/bin/gosu -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64"; \
curl -o /usr/local/bin/gosu.asc -SL "https://github.com/tianon/gosu/releases/download/$GOSU_VERSION/gosu-amd64.asc"; \
gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4; \
gpg --batch --verify /usr/local/bin/gosu.asc /usr/local/bin/gosu; \
rm -rf /root/.gnupg/ /usr/local/bin/gosu.asc; \
command -v gpgconf && gpgconf --kill all || :; \
chmod +x /usr/local/bin/gosu; \
gosu --version; \
gosu nobody true
RUN sed \
-e '/^nexus-args/ s:$:,${jetty.etc}/jetty-https.xml:' \
-e '/^application-port/a \
application-port-ssl=8443\
' \
-i ${NEXUS_HOME}/etc/nexus-default.properties
COPY entrypoint.sh ${NEXUS_HOME}/entrypoint.sh
RUN chown nexus:nexus ${NEXUS_HOME}/entrypoint.sh && chmod a+x ${NEXUS_HOME}/entrypoint.sh
VOLUME [ "${NEXUS_SSL}" ]
EXPOSE 8443
WORKDIR ${NEXUS_HOME}
ENTRYPOINT [ "./entrypoint.sh" ]
CMD [ "bin/nexus", "run" ]