<commit_before>###############################################################################
# Copyright (c) 2011, 2016 Red Hat and/or its affiliates and others
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
###############################################################################

FROM java:8

MAINTAINER <NAME> <<EMAIL>>

ENV DATA_DIR /opt/h2-data

RUN curl http://www.h2database.com/h2-2016-10-31.zip -o h2-2016-10-31.zip
RUN unzip h2-2016-10-31.zip -d /opt/
RUN rm h2-2016-10-31.zip
RUN mkdir -p ${DATA_DIR}

VOLUME ${DATA_DIR}

EXPOSE 8181 3306

CMD java -cp /opt/h2/bin/h2*.jar org.h2.tools.Server \
  -web -webAllowOthers -webPort 8181 -tcp -tcpAllowOthers -tcpPort 3306 \
  -baseDir ${DATA_DIR}<commit_msg>Run kapua-sql based on the openjdk:8-alpine image<commit_after>###############################################################################
# Copyright (c) 2016, 2017 Red Hat Inc and others
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# http://www.eclipse.org/legal/epl-v10.html
#
###############################################################################

FROM openjdk:8u111-jre-alpine

MAINTAINER <NAME> <<EMAIL>>

ENV DATA_DIR /opt/h2-data

RUN adduser -D -g "Eclipse Kapua" kapua && \
    apk update && apk add curl && \
    mkdir -p "${DATA_DIR}" && \
    chown kapua:kapua "${DATA_DIR}" && chmod a+rw "${DATA_DIR}"

USER kapua

WORKDIR /home/kapua
RUN curl http://www.h2database.com/h2-2016-10-31.zip -o h2-2016-10-31.zip && \
  unzip h2-2016-10-31.zip && \
  rm h2-2016-10-31.zip

VOLUME ${DATA_DIR}

EXPOSE 8181 3306

CMD java -cp /home/kapua/h2/bin/h2*.jar org.h2.tools.Server \
  -web -webAllowOthers -webPort 8181 -tcp -tcpAllowOthers -tcpPort 3306 \
  -baseDir "${DATA_DIR}"
{'fraction_non_alphanumeric': 0.2612264606470304, 'fraction_numerical': 0.06953162723322066, 'mean_word_length': 4.285714285714286, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4027519', 'n_tokens_mistral': 780, 'n_tokens_neox': 672, 'n_words': 194}