Adjustments to Dockerfile
FROM ubuntu:xenial
-# Borrowed with love from https://github.com/StackStorm/st2-dockerfiles/blob/master/base/Dockerfile
+# Lovingly borrowed and modified from https://github.com/StackStorm/st2-dockerfiles/blob/master/base/Dockerfile
ARG DEBIAN_FRONTEND=noninteractive
ARG ST2_VERSION=2.9.1
RUN : "${ST2_VERSION:?Docker build argument needs to be set and non-empty.}"
-LABEL maintainer="StackStorm <info@stackstorm.com>"
-LABEL com.stackstorm.vendor="StackStorm"
-LABEL com.stackstorm.support="Community"
-LABEL com.stackstorm.version="${ST2_VERSION}"
-LABEL com.stackstorm.name="StackStorm K8s HA"
-LABEL com.stackstorm.description="Docker image, optimized to run StackStorm \
-components and core services with Highly Available requirements in Kubernetes environment"
-LABEL com.stackstorm.url="https://stackstorm.com/#product"
-
ENV container docker
ENV ENV /etc/skel/.profile
ENV TERM xterm
@@ -51,29 +42,11 @@ RUN apt-get install -y mongodb-org
RUN apt-get install -y rabbitmq-server
#####################################################################################################
-## Change Password
+## Install StackStorm
#####################################################################################################
ENV ST2_PASSWORD=antidotepassword
-#####################################################################################################
-## Prepare the environement and install StackStorm (install script)
-#####################################################################################################
-
-# RUN export DEBIAN_FRONTEND=noninteractive \
-# && export NO_PROXY=localhost,127.0.0.1,${HOSTNAME} \
-# && apt-get update \
-# && apt-get dist-upgrade --yes \
-# && apt-get install --yes curl vim gnupg-curl tree \
-# # && curl -sSL -O https://stackstorm.com/packages/install.sh ; chmod +x install.sh ; ./install.sh --user=st2admin \
-# && curl -sSL https://stackstorm.com/packages/install.sh | bash -s -- --user=st2admin --password=${ST2_PASSWORD} --version=2.9.1
-
-
-
-
-# RUN ls -lha /etc/init.d
-# RUN apt-cache policy st2
-
# Install StackStorm, but without UI
RUN curl -sf https://packagecloud.io/install/repositories/StackStorm/stable/script.deb.sh | bash \
&& apt-get install -y st2=${ST2_VERSION}-* \
@@ -90,19 +63,16 @@ ADD start_st2_services.sh /
RUN apt-get update && apt-get install -y openssh-server python git vim screen
ADD napalm.yaml /opt/stackstorm/configs
-RUN screen -d -m /start_st2_services.sh && sleep 5 && st2ctl reload --register-all && st2 pack install napalm
-
-# st2ctl reload --register-all
-
-
-
-# EXPOSE 9100
-# EXPOSE 9101
-# EXPOSE 9102
+RUN cp -r /usr/share/doc/st2/examples/ /opt/stackstorm/packs/
+RUN screen -d -m /start_st2_services.sh && sleep 15 \
+ && st2ctl reload --register-all \
+ && st2 run packs.setup_virtualenv packs=examples \
+ && st2 pack install napalm
#####################################################################################################
-## Security options from Utility
+## Security options (copied from Utility)
#####################################################################################################
+
RUN mkdir /var/run/sshd
# Antidote user
