Commit c292c28d authored by Adam Fekete's avatar Adam Fekete
Browse files

adding Dockerfile

parent 24e597b5
FROM mysql:5.6
RUN apt-get -y update && apt-get install -y \
apt-utils \
bzip2 \
unzip \
xz-utils
RUN echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | \
tee /etc/apt/sources.list.d/webupd8team-java.list && \
echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | \
tee -a /etc/apt/sources.list.d/webupd8team-java.list && \
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \
apt-get update -y && \
echo debconf shared/accepted-oracle-license-v1-1 select true | \
debconf-set-selections && \
echo debconf shared/accepted-oracle-license-v1-1 seen true | \
debconf-set-selections && \
apt-get install oracle-java8-installer -y && \
apt-get install oracle-java8-set-default -y
# Default to UTF-8 file.encoding
ENV LANG C.UTF-8
# add a simple script that can auto-detect the appropriate JAVA_HOME value
# based on whether the JDK or only the JRE is installed
RUN { \
echo '#!/bin/sh'; \
echo 'set -e'; \
echo; \
echo 'dirname "$(dirname "$(readlink -f "$(which javac || which java)")")"'; \
} > /usr/local/bin/docker-java-home \
&& chmod +x /usr/local/bin/docker-java-home
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
#ENV JAVA_VERSION 8u102
#ENV JAVA_DEBIAN_VERSION 8u102-b14.1-1~bpo8+1
ENV MYSQL_ALLOW_EMPTY_PASSWORD yes
RUN apt-get install -y wget && mkdir -p /Creedo/ && cd /Creedo/ && wget https://bitbucket.org/realKD/creedo/downloads/Creedo-0.4.2-rc6.zip && unzip Creedo* && mv Creedo-0.4.2-SNAPSHOT/ executable/ && sed -i 's/base,default/base,nomad/' executable/creedo.properties
ADD readinbox.sh /Creedo/readinbox.sh
ADD startCreedo.sh startCreedo.sh
RUN mkdir /Creedo/inbox && chmod +x /Creedo/readinbox.sh
ENTRYPOINT ["/bin/bash"]
CMD ["/startCreedo.sh"]
name=test
echo "cp inbox/data_"$name".csv persistent_data/content" | xargs
echo "cp inbox/data_"$name"_attributes.csv persistent_data/content" | xargs
echo "\"DELETE FROM mining__data_parameters where entry_id ='"$name"'; DELETE FROM mining__data where id ='"$name"';\"" | xargs mysql -D creedo_0.3.1 -e
echo "\"INSERT INTO mining__data (id,content_class_name) VALUES ('"$name"','de.unibonn.creedo.boot.FixedComponentWorkspaceBuilder');\"" | xargs mysql -D creedo_0.3.1 -e
echo "\"INSERT INTO mining__data_parameters (entry_id,param_name,param_value) VALUES ('"$name"','Table name','"$name"');\"" | xargs mysql -D creedo_0.3.1 -e
echo "\"INSERT INTO mining__data_parameters (entry_id,param_name,param_value) VALUES ('"$name"','Table description','');\"" | xargs mysql -D creedo_0.3.1 -e
echo "\"INSERT INTO mining__data_parameters (entry_id,param_name,param_value) VALUES ('"$name"','Data file','data_"$name".csv');\"" | xargs mysql -D creedo_0.3.1 -e
echo "\"INSERT INTO mining__data_parameters (entry_id,param_name,param_value) VALUES ('"$name"','Attributes file','data_"$name"_attributes.csv');\"" | xargs mysql -D creedo_0.3.1 -e
echo "\"INSERT INTO mining__data_parameters (entry_id,param_name,param_value) VALUES ('"$name"','Delimeter',',');\"" | xargs mysql -D creedo_0.3.1 -e
echo "\"INSERT INTO mining__data_parameters (entry_id,param_name,param_value) VALUES ('"$name"','Missing code','?');\"" | xargs mysql -D creedo_0.3.1 -e
/usr/local/bin/docker-entrypoint.sh mysqld &
cd /Creedo/executable
sleep 15
/Creedo/executable/startup.sh
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment