forked from schemaspy/schemaspy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
51 lines (39 loc) · 1.55 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
47
48
49
50
51
FROM openjdk:8u111-jre-alpine
ENV LC_ALL=C
ARG GIT_BRANCH=local
ARG GIT_REVISION=local
ENV MYSQL_VERSION=6.0.6
ENV MARIADB_VERSION=1.1.10
ENV POSTGRESQL_VERSION=42.1.1
ENV JTDS_VERSION=1.3.1
LABEL MYSQL_VERSION=$MYSQL_VERSION
LABEL MARIADB_VERSION=$MARIADB_VERSION
LABEL POSTGRESQL_VERSION=$POSTGRESQL_VERSION
LABEL JTDS_VERSION=$JTDS_VERSION
LABEL GIT_BRANCH=$GIT_BRANCH
LABEL GIT_REVISION=$GIT_REVISION
ADD docker/open-sans.tar.gz /usr/share/fonts/
RUN adduser java -h / -D && \
set -x && \
apk add --no-cache curl unzip graphviz fontconfig && \
fc-cache -fv && \
mkdir /drivers_inc && \
cd /drivers_inc && \
curl -JLO http://search.maven.org/remotecontent?filepath=mysql/mysql-connector-java/$MYSQL_VERSION/mysql-connector-java-$MYSQL_VERSION.jar && \
curl -JLO http://search.maven.org/remotecontent?filepath=org/mariadb/jdbc/mariadb-java-client/$MARIADB_VERSION/mariadb-java-client-$MARIADB_VERSION.jar && \
curl -JLO http://search.maven.org/remotecontent?filepath=org/postgresql/postgresql/$POSTGRESQL_VERSION.jre7/postgresql-$POSTGRESQL_VERSION.jre7.jar && \
curl -JLO http://search.maven.org/remotecontent?filepath=net/sourceforge/jtds/jtds/$JTDS_VERSION/jtds-$JTDS_VERSION.jar && \
mkdir /drivers && \
mkdir /output && \
mkdir /config && \
chown -R java /drivers_inc && \
chown -R java /drivers && \
chown -R java /output && \
chown -R java /config && \
apk del curl
ADD target/schema*.jar /
ADD docker/entrypoint.sh /
USER java
WORKDIR /
VOLUME /drivers /output /config
ENTRYPOINT ["/entrypoint.sh"]