You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@marmotta.apache.org by wi...@apache.org on 2015/11/12 18:28:05 UTC

[04/13] marmotta git commit: MARMOTTA-588: moved docker stuff to the webapp launcher

MARMOTTA-588: moved docker stuff to the webapp launcher


Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo
Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/aa16fbcc
Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/aa16fbcc
Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/aa16fbcc

Branch: refs/heads/develop
Commit: aa16fbccdcfb198068513f998442e391a2d1e17c
Parents: 78ca9bf
Author: Sergio Fernández <wi...@apache.org>
Authored: Tue Nov 10 12:17:56 2015 +0100
Committer: Sergio Fernández <wi...@apache.org>
Committed: Tue Nov 10 12:17:56 2015 +0100

----------------------------------------------------------------------
 launchers/marmotta-docker/Dockerfile | 53 -------------------------------
 launchers/marmotta-docker/README.md  | 21 ------------
 launchers/marmotta-webapp/Dockerfile | 53 +++++++++++++++++++++++++++++++
 launchers/marmotta-webapp/README.md  | 21 ++++++++++++
 4 files changed, 74 insertions(+), 74 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/marmotta/blob/aa16fbcc/launchers/marmotta-docker/Dockerfile
----------------------------------------------------------------------
diff --git a/launchers/marmotta-docker/Dockerfile b/launchers/marmotta-docker/Dockerfile
deleted file mode 100644
index 2eb235c..0000000
--- a/launchers/marmotta-docker/Dockerfile
+++ /dev/null
@@ -1,53 +0,0 @@
-# Dockerfile for Apache Marmotta
-
-FROM debian:sid
-MAINTAINER Sergio Fernández <wi...@apache.org>
-WORKDIR /src
-EXPOSE 8080
-EXPOSE 5432
-
-# general configuration
-ENV DEBIAN_FRONTEND noninteractive
-ENV baseurl http://localhost:8080/marmotta
-ENV dbname marmotta
-ENV dbuser marmotta
-ENV dbpass s3cr3t
-ENV conf /var/lib/marmotta/system-config.properties
-
-# install base system
-RUN sed -i.bak s/"exit 101"/"exit 0"/g /usr/sbin/policy-rc.d
-RUN apt-get update
-RUN apt-get install -y apt-utils
-RUN apt-get upgrade -y
-RUN apt-get install -y sudo
-RUN apt-get install -y locales
-RUN locale-gen en_US.UTF-8 en_us && dpkg-reconfigure locales && dpkg-reconfigure locales && locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8
-RUN apt-get install -y git ssmtp
-RUN apt-get install -y openjdk-7-jre-headless openjdk-7-jdk maven
-RUN apt-get install -y tomcat7
-RUN apt-get install -y postgresql postgresql-common postgresql-contrib
-
-# pre-setup
-USER postgres
-RUN psql -c "CREATE USER $dbuser WITH PASSWORD '$dbpass'"
-RUN psql -c "CREATE DATABASE $dbname WITH OWNER $dbuser"
-USER root
-RUN mkdir -p "$(dirname $conf)"
-RUN echo "" > $conf
-RUN echo "security.enabled = false" >> $conf
-RUN echo "database.type = postgres" >> $conf
-RUN echo "database.url = jdbc:postgresql://localhost:5432/$dbname?prepareThreshold=3" >> $conf
-RUN echo "database.user = $dbuser" >> $conf
-RUN echo "database.password = $dbpas" >> $conf
-RUN chmod -R tomcat7:tomcat7 "$(dirname $conf)"
-
-# package from source code and install the webapp
-RUN git clone -b develop https://git-wip-us.apache.org/repos/asf/marmotta.git
-RUN cd marmotta/launchers/marmotta-webapp/ && mvn clean package -Djdeb.signing=false
-RUN dpkg -i marmotta/launchers/marmotta-webapp/target/marmotta*.deb
-
-# cleanup
-#RUN cd marmotta/ && mvn clean
-RUN apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y
-RUN mv /usr/sbin/policy-rc.d.bak /usr/sbin/policy-rc.d
-

http://git-wip-us.apache.org/repos/asf/marmotta/blob/aa16fbcc/launchers/marmotta-docker/README.md
----------------------------------------------------------------------
diff --git a/launchers/marmotta-docker/README.md b/launchers/marmotta-docker/README.md
deleted file mode 100644
index 9e45c2a..0000000
--- a/launchers/marmotta-docker/README.md
+++ /dev/null
@@ -1,21 +0,0 @@
-# Apache Marmotta Docker launcher
-
-This launcher creates a Docker images that you can user for developing or testing
-Apache Marmotta.
-
-## Build image
-
-    sudo docker build -t marmotta .
-
-## Get image
-
-@@TODO@@: push it to asf or docker hub
-
-## Run
-
-    docker run -p 8080:8080
-
-## Accesss
-
-Access Marmotta runing inside the container, at [172.17.42.1:8080/marmotta](http://172.17.42.1:8080/marmotta) 
-(IP address may be different, use `docker inspect CONTAINER_ID` for details).

http://git-wip-us.apache.org/repos/asf/marmotta/blob/aa16fbcc/launchers/marmotta-webapp/Dockerfile
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/Dockerfile b/launchers/marmotta-webapp/Dockerfile
new file mode 100644
index 0000000..2eb235c
--- /dev/null
+++ b/launchers/marmotta-webapp/Dockerfile
@@ -0,0 +1,53 @@
+# Dockerfile for Apache Marmotta
+
+FROM debian:sid
+MAINTAINER Sergio Fernández <wi...@apache.org>
+WORKDIR /src
+EXPOSE 8080
+EXPOSE 5432
+
+# general configuration
+ENV DEBIAN_FRONTEND noninteractive
+ENV baseurl http://localhost:8080/marmotta
+ENV dbname marmotta
+ENV dbuser marmotta
+ENV dbpass s3cr3t
+ENV conf /var/lib/marmotta/system-config.properties
+
+# install base system
+RUN sed -i.bak s/"exit 101"/"exit 0"/g /usr/sbin/policy-rc.d
+RUN apt-get update
+RUN apt-get install -y apt-utils
+RUN apt-get upgrade -y
+RUN apt-get install -y sudo
+RUN apt-get install -y locales
+RUN locale-gen en_US.UTF-8 en_us && dpkg-reconfigure locales && dpkg-reconfigure locales && locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8
+RUN apt-get install -y git ssmtp
+RUN apt-get install -y openjdk-7-jre-headless openjdk-7-jdk maven
+RUN apt-get install -y tomcat7
+RUN apt-get install -y postgresql postgresql-common postgresql-contrib
+
+# pre-setup
+USER postgres
+RUN psql -c "CREATE USER $dbuser WITH PASSWORD '$dbpass'"
+RUN psql -c "CREATE DATABASE $dbname WITH OWNER $dbuser"
+USER root
+RUN mkdir -p "$(dirname $conf)"
+RUN echo "" > $conf
+RUN echo "security.enabled = false" >> $conf
+RUN echo "database.type = postgres" >> $conf
+RUN echo "database.url = jdbc:postgresql://localhost:5432/$dbname?prepareThreshold=3" >> $conf
+RUN echo "database.user = $dbuser" >> $conf
+RUN echo "database.password = $dbpas" >> $conf
+RUN chmod -R tomcat7:tomcat7 "$(dirname $conf)"
+
+# package from source code and install the webapp
+RUN git clone -b develop https://git-wip-us.apache.org/repos/asf/marmotta.git
+RUN cd marmotta/launchers/marmotta-webapp/ && mvn clean package -Djdeb.signing=false
+RUN dpkg -i marmotta/launchers/marmotta-webapp/target/marmotta*.deb
+
+# cleanup
+#RUN cd marmotta/ && mvn clean
+RUN apt-get clean -y && apt-get autoclean -y && apt-get autoremove -y
+RUN mv /usr/sbin/policy-rc.d.bak /usr/sbin/policy-rc.d
+

http://git-wip-us.apache.org/repos/asf/marmotta/blob/aa16fbcc/launchers/marmotta-webapp/README.md
----------------------------------------------------------------------
diff --git a/launchers/marmotta-webapp/README.md b/launchers/marmotta-webapp/README.md
new file mode 100644
index 0000000..9e45c2a
--- /dev/null
+++ b/launchers/marmotta-webapp/README.md
@@ -0,0 +1,21 @@
+# Apache Marmotta Docker launcher
+
+This launcher creates a Docker images that you can user for developing or testing
+Apache Marmotta.
+
+## Build image
+
+    sudo docker build -t marmotta .
+
+## Get image
+
+@@TODO@@: push it to asf or docker hub
+
+## Run
+
+    docker run -p 8080:8080
+
+## Accesss
+
+Access Marmotta runing inside the container, at [172.17.42.1:8080/marmotta](http://172.17.42.1:8080/marmotta) 
+(IP address may be different, use `docker inspect CONTAINER_ID` for details).