This repository has been archived by the owner on Nov 4, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 91
/
Dockerfile
43 lines (35 loc) · 1.81 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
FROM httpd:alpine
ARG BUILD_DATE
ARG BUILD_VERSION
ARG http_proxy
ARG https_proxy
ARG no_proxy
# Labels.
LABEL maintainer="jeremy.long@gmail.com"
LABEL name="sspringett/nvdmirror"
LABEL version=$BUILD_VERSION
LABEL org.label-schema.schema-version="1.0"
LABEL org.label-schema.build-date=$BUILD_DATE
LABEL org.label-schema.name="sspringett/nvdmirror"
LABEL org.label-schema.description="NIST Data Mirror"
LABEL org.label-schema.url="https://github.com/stevespringett/nist-data-mirror"
LABEL org.label-schema.vcs-url="https://github.com/stevespringett/nist-data-mirror"
LABEL org.label-schema.vendor="sspringett"
LABEL org.label-schema.version=$BUILD_VERSION
LABEL org.label-schema.docker.cmd="docker run -dit --name mirror -p 80:80 --mount type=bind,source=\"$(pwd)\"/target/docs/,target=/usr/local/apache2/htdocs sspringett/nvdmirror"
ENV user=mirror
RUN apk update && \
apk add --no-cache openjdk8-jre dcron nss supervisor && \
addgroup -S $user && \
adduser -S $user -G $user && \
mkdir -p /tmp/nvd && \
chown -R $user:$user /tmp/nvd && \
chown -R $user:$user /usr/local/apache2/htdocs && \
rm -v /usr/local/apache2/htdocs/index.html
COPY ["/src/docker/conf/supervisord.conf", "/etc/supervisor/conf.d/supervisord.conf"]
COPY ["/src/docker/scripts/mirror.sh", "/mirror.sh"]
COPY ["/src/docker/crontab/mirror", "/etc/crontabs/mirror"]
COPY ["/src/docker/conf/mirror.conf", "/usr/local/apache2/conf"]
COPY ["/target/nist-data-mirror.jar", "/usr/local/bin/"]
EXPOSE 80/tcp
CMD ["/usr/bin/supervisord", "-n", "-c", "/etc/supervisor/conf.d/supervisord.conf", "-l", "/var/log/supervisord.log", "-j", "/var/run/supervisord.pid"]