You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sling.apache.org by ro...@apache.org on 2015/10/12 16:16:44 UTC
svn commit: r1708126 - in /sling/trunk/launchpad/docker: README.txt
docker-compose-mongo.yml
Author: rombert
Date: Mon Oct 12 14:16:43 2015
New Revision: 1708126
URL: http://svn.apache.org/viewvc?rev=1708126&view=rev
Log:
SLING-5097 - Deploy docker image to Docker Hub
Updated README, added a docker-compose file for running with MongoDB.
Added:
sling/trunk/launchpad/docker/docker-compose-mongo.yml
Modified:
sling/trunk/launchpad/docker/README.txt
Modified: sling/trunk/launchpad/docker/README.txt
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/docker/README.txt?rev=1708126&r1=1708125&r2=1708126&view=diff
==============================================================================
--- sling/trunk/launchpad/docker/README.txt (original)
+++ sling/trunk/launchpad/docker/README.txt Mon Oct 12 14:16:43 2015
@@ -1,24 +1,32 @@
-Apache Sling Launchpad Dockerfile
+Apache Sling Launchpad - Docker integration
-The Launchpad Dockerfile directory allows building a Dockerfile based on
-a previously existing launchpad jar file.
+The Launchpad Docker integration project is a helper aimed to make it
+simple to build an 'official' Sling docker image.
-Getting Started
-===============
+The Dockerfile expects a org.apache.sling.launchpad.jar file present in the
+root directory.
-Building the Docker Image required an installation of Docker
-(https://www.docker.com/) . It has been tested on version 1.8.2, but it
-is expected that older versions will work.
+Building a Docker image
+---------------------------------------------
-To build an image, first copy a launchpad jar file and rename it to
-org.apache.sling.launchpad.jar. Then run the docker command
-
- sudo docker build -t sling .
+$ sudo docker build -t sling .
-When running the Docker image it is possible to customise the JVM
-parameters, as well as the options passed to Sling, for instance:
+Running a standalone Sling instance
+---------------------------------------------
- sudo docker run -e SLING_OPTS='-Dsling.run.modes=oak' \
- -e JAVA_OPTS='-Xmx256m' -P -v /data/sling:/opt/sling/sling \
- -d --name sling-8-testing sling
+To launch a docker instance named 'my-sling-container' bound to
+port 8080 on the local machine, and with the /opt/sling/sling volume
+mounted at /srv/docker/sling in the local machine, execute:
+$ sudo docker run -ti -p 8080:8080 -v /srv/docker/sling:/opt/sling/sling \
+ --name my-sling-container sling
+
+
+Running a Sling instance connected to MongoDB
+---------------------------------------------
+
+There is a docker-compose-mongodb.yml file supplied which shows how to run
+the Sling launchpad in a docker container linked to a mongo one. To launch
+both containers, execute:
+
+$ sudo docker-compose -f docker-compose-mongo.yml up
Added: sling/trunk/launchpad/docker/docker-compose-mongo.yml
URL: http://svn.apache.org/viewvc/sling/trunk/launchpad/docker/docker-compose-mongo.yml?rev=1708126&view=auto
==============================================================================
--- sling/trunk/launchpad/docker/docker-compose-mongo.yml (added)
+++ sling/trunk/launchpad/docker/docker-compose-mongo.yml Mon Oct 12 14:16:43 2015
@@ -0,0 +1,10 @@
+sling:
+ build: .
+ ports:
+ - "8080:8080"
+ links:
+ - mongo
+ environment:
+ - SLING_OPTS=-Dsling.run.modes=oak_mongo -Doak.mongo.uri=mongodb://mongo:27017
+mongo:
+ image: mongo:3.0