forked from schemaspy/schemaspy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
52 lines (40 loc) · 1.69 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
52
FROM openjdk:17-alpine3.14
ENV LC_ALL=C
ARG GIT_BRANCH=local
ARG GIT_REVISION=local
ENV MYSQL_VERSION=8.0.28
ENV MARIADB_VERSION=1.1.10
ENV POSTGRESQL_VERSION=42.3.8
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 -L https://search.maven.org/remotecontent?filepath=mysql/mysql-connector-java/$MYSQL_VERSION/mysql-connector-java-$MYSQL_VERSION.jar \
-o mysql-connector-java-$MYSQL_VERSION.jar && \
curl -L https://search.maven.org/remotecontent?filepath=org/mariadb/jdbc/mariadb-java-client/$MARIADB_VERSION/mariadb-java-client-$MARIADB_VERSION.jar \
-o mariadb-java-client-$MARIADB_VERSION.jar && \
curl -L https://search.maven.org/remotecontent?filepath=org/postgresql/postgresql/$POSTGRESQL_VERSION/postgresql-$POSTGRESQL_VERSION.jar \
-o postgresql-$POSTGRESQL_VERSION.jar && \
curl -L https://search.maven.org/remotecontent?filepath=net/sourceforge/jtds/jtds/$JTDS_VERSION/jtds-$JTDS_VERSION.jar \
-o jtds-$JTDS_VERSION.jar && \
mkdir /output && \
chown -R java /drivers_inc && \
chown -R java /output && \
apk del curl
ADD target/schema*-app.jar /usr/local/lib/schemaspy/
ADD docker/schemaspy.sh /usr/local/bin/schemaspy
USER java
WORKDIR /
ENV SCHEMASPY_DRIVERS=/drivers
ENV SCHEMASPY_OUTPUT=/output
ENTRYPOINT ["/usr/local/bin/schemaspy"]