<commit_before>FROM centos/systemd

MAINTAINER <NAME> <<EMAIL>>
MAINTAINER <NAME> <<EMAIL>>

ARG ARTIFACT_DOWNLOAD_URL

ADD postconfig /opt/postconfig

ENV PUBLIC_HOSTNAME=${PUBLIC_HOSTNAME:-$HOSTNAME} \
    ALLOWED_AUTH_URIS=${ALLOWED_AUTH_URIs:-}

EXPOSE 8000
EXPOSE 8003
EXPOSE 8004
EXPOSE 5000
EXPOSE 5672

RUN /usr/bin/yum -y update && \
  /usr/bin/yum -y install which \
                  wget \
                  unzip \
                  git \
                  tar \
                  gzip \
                  logrotate \
                  net-tools \
                  python-setuptools \
                  gcc \
                  gcc-c++ && \
  wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py && \
  python get-pip.py && \
  pip install --upgrade pip

#use this when testing local
#ADD ibm-ucd-patterns-engine-6.2.1.2.801498.tgz /tmp/

RUN  ls -l /opt/postconfig && \
  wget -O - $ARTIFACT_DOWNLOAD_URL | tar zxf - -C /tmp/ && \
  rm -f /tmp/ibm-ucd-patterns-install/engine-install/media/build.gradle && \
  cp /opt/postconfig/build.gradle /tmp/ibm-ucd-patterns-install/engine-install/media/build.gradle && \
  cd /tmp/ibm-ucd-patterns-install/engine-install && \
  JAVA_HOME=/tmp/ibm-ucd-patterns-install/engine-install/media/engine/java/jre \
  JAVA_OPTS=" -Dlicense.accepted=Y -Dinstall.engine.dependencies.installed=Y \
  -Dinstall.engine.start.services=No \
  -Dinstall.engine.keystone.url=KEYSTONE_URL \
  -Dinstall.engine.public.hostname=ENGINE_HOSTNAME \
  -Dinstall.engine.bind.addr=0.0.0.0" \
  ./gradlew -sSq configure installPatternServices configureMySQLPythonDependencies installIdentityServices configureIdentityService  && \
  rm -rf /tmp/ibm-ucd-patterns-install && \
  /usr/bin/yum clean packages && \
  cp /opt/postconfig/init-heat.service /etc/systemd/system/init-heat.service && \
  systemctl enable init-heat && \
  systemctl enable mariadb && \
  systemctl enable rabbitmq-server

CMD ["/usr/sbin/init"]<commit_msg>Update Dockerfile<commit_after>FROM centos/systemd

MAINTAINER <NAME> <<EMAIL>>
MAINTAINER <NAME> <<EMAIL>>

ARG ARTIFACT_DOWNLOAD_URL

ADD postconfig /opt/postconfig

ENV PUBLIC_HOSTNAME=${PUBLIC_HOSTNAME:-$HOSTNAME} \
    ALLOWED_AUTH_URIS=${ALLOWED_AUTH_URIs:-}

EXPOSE 8000
EXPOSE 8003
EXPOSE 8004
EXPOSE 5000
EXPOSE 5672

RUN /usr/bin/yum -y update && \
  /usr/bin/yum -y install which \
                  wget \
                  unzip \
                  git \
                  tar \
                  gzip \
                  logrotate \
                  net-tools \
                  python-setuptools \
                  gcc \
                  gcc-c++ && \
  wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py && \
  python get-pip.py && \
  pip install --upgrade pip

#use this when testing local
#ADD ibm-ucd-patterns-engine-6.2.1.2.801498.tgz /tmp/

RUN  ls -l /opt/postconfig && \
  wget -O - $ARTIFACT_DOWNLOAD_URL | tar zxf - -C /tmp/ && \
  rm -f /tmp/ibm-ucd-patterns-install/engine-install/media/build.gradle && \
  cp /opt/postconfig/build.gradle /tmp/ibm-ucd-patterns-install/engine-install/media/build.gradle && \
  cd /tmp/ibm-ucd-patterns-install/engine-install && \
  JAVA_HOME=/tmp/ibm-ucd-patterns-install/engine-install/media/engine/java/jre \
  JAVA_OPTS=" -Dlicense.accepted=Y -Dinstall.engine.dependencies.installed=Y \
  -Dinstall.engine.start.services=No \
  -Dinstall.engine.keystone.url=KEYSTONE_URL \
  -Dinstall.engine.public.hostname=ENGINE_HOSTNAME \
  -Dinstall.engine.bind.addr=0.0.0.0" \
  ./gradlew -sSq configure installPatternServices configureMySQLPythonDependencies installIdentityServices configureIdentityService  && \
  rm -rf /tmp/ibm-ucd-patterns-install && \
  /usr/bin/yum clean packages && \
  cp /opt/postconfig/init-heat.service /etc/systemd/system/init-heat.service && \
  systemctl enable init-heat && \
  systemctl enable mariadb && \
  systemctl enable rabbitmq-server

VOLUME ["/root/envvars.txt"]
CMD ["/usr/sbin/init"]
{'fraction_non_alphanumeric': 0.1308953341740227, 'fraction_numerical': 0.017150063051702396, 'mean_word_length': 2.398457583547558, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 4, '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': '2421125', 'n_tokens_mistral': 1503, 'n_tokens_neox': 1381, 'n_words': 232}