-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
29 lines (21 loc) · 943 Bytes
/
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
FROM mysql:5.7.20
LABEL maintainer="Stefan Neuhaus <[email protected]>"
ENV MYSQL_DATABASE=dependencycheck \
MYSQL_ROOT_PASSWORD=v3ry-s3cr3t
WORKDIR /dependencycheck
COPY gradle/wrapper/* /dependencycheck/gradle/wrapper/
COPY gradlew /dependencycheck/
RUN set -ex && \
echo "deb http://http.debian.net/debian jessie-backports main" >/etc/apt/sources.list.d/jessie-backports.list; \
apt-get update; \
apt-get install -y -t jessie-backports openjdk-8-jre-headless cron; \
apt-get purge -y --auto-remove; \
rm -rf /var/lib/apt; \
/dependencycheck/gradlew --no-daemon wrapper; \
echo "0 * * * * /dependencycheck/update.sh" >/etc/cron.d/dependencycheck-database-update; \
crontab /etc/cron.d/dependencycheck-database-update
COPY initialize.sql database.gradle update.sh /dependencycheck/
COPY initialize.sh /docker-entrypoint-initdb.d/
COPY wrapper.sh /wrapper.sh
EXPOSE 3306
CMD ["/wrapper.sh"]