forked from zilvinasu/h2-dockerfile
-
Notifications
You must be signed in to change notification settings - Fork 30
/
Dockerfile
31 lines (22 loc) · 895 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
30
31
# openjdk:11 image built on Debian GNU/Linux 11 (bullseye)
FROM openjdk:11
# A merge of:
# https://github.com/zhilvis/docker-h2
# https://github.com/zilvinasu/h2-dockerfile
LABEL org.opencontainers.image.authors="https://github.com/oscarfonts/docker-h2/graphs/contributors"
ENV DOWNLOAD https://github.com/h2database/h2database/releases/download/version-2.1.210/h2-2022-01-17.zip
ENV DATA_DIR /opt/h2-data
RUN mkdir -p ${DATA_DIR} \
&& curl -L ${DOWNLOAD} -o h2.zip \
&& unzip h2.zip -d /opt/ \
&& rm h2.zip
COPY h2.server.properties /root/.h2.server.properties
EXPOSE 81 1521
WORKDIR /opt/h2-data
COPY h2cli.sh h2cli
RUN chmod a+rx h2cli && mv h2cli /opt/h2/bin
ENV PATH="${PATH}:/opt/h2/bin"
CMD java -cp /opt/h2/bin/h2*.jar org.h2.tools.Server \
-web -webAllowOthers -webPort 81 \
-tcp -tcpAllowOthers -tcpPort 1521 \
-baseDir ${DATA_DIR} ${H2_OPTIONS}