-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile
48 lines (35 loc) · 1.25 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
##################################################
# BUILDER CONTAINER
##################################################
FROM openjdk:11.0.12-jdk-slim-buster as builder
USER root
WORKDIR /usr/src/dependencies
# INSTALL MAKE
RUN apt update
RUN apt install build-essential -y
RUN apt install wget -y
# INSTALL SQLITE3
RUN wget https://www.sqlite.org/2021/sqlite-autoconf-3340100.tar.gz \
&& tar -zxf sqlite-autoconf-3340100.tar.gz \
&& cd sqlite-autoconf-3340100 \
&& ./configure \
&& make \
&& make install
# USER 'make' and 'sqlite3' to create the dev database
COPY Makefile Makefile
COPY settings.gradle settings.gradle
COPY build.gradle build.gradle
COPY database/sqlite database/sqlite
RUN make sqlite-db-refresh
##################################################
# FINAL CONTAINER
##################################################
FROM openjdk:11.0.12-jre-slim-buster
USER root
ARG VERSION
WORKDIR /usr/src/app
# copy jar, dev db, and dev resource files
COPY build/libs/ga4gh-starter-kit-common-${VERSION}.jar ga4gh-starter-kit-common.jar
COPY --from=builder /usr/src/dependencies/ga4gh-starter-kit.dev.db ga4gh-starter-kit.dev.db
COPY src/test/resources/ src/test/resources/
ENTRYPOINT ["java", "-jar", "ga4gh-starter-kit-common.jar"]