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 2022/02/03 16:48:24 UTC

[sling-org-apache-sling-starter] 07/07: SLING-9638 - Update Starter Docker image to be based on the feature model

This is an automated email from the ASF dual-hosted git repository.

rombert pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/sling-org-apache-sling-starter.git

commit fb83a841ee7473b55e855076392c216e157d1d6b
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Nov 26 17:19:55 2021 +0100

    SLING-9638 - Update Starter Docker image to be based on the feature model
    
    Add a couple of docker-compose samples showing how to run Sling with Docker.
---
 README.md                          |  4 +++-
 docker/docker-compose-mongodb.yaml | 31 +++++++++++++++++++++++++++++++
 docker/docker-compose-tar.yaml     | 27 +++++++++++++++++++++++++++
 3 files changed, 61 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 24b6570..9d9910f 100644
--- a/README.md
+++ b/README.md
@@ -65,7 +65,7 @@ $ mvn clean package -Ddocker.skip=false -Ddocker.label=local
 $ docker run --rm -p 8080 apache/sling:local
 ```
 
-By default the iamge launches the `oak_tar` aggregate. The aggregate to launch can be selected by passing an additional argument to the image, e.g.:
+By default the image launches the `oak_tar` aggregate. The aggregate to launch can be selected by passing an additional argument to the image, e.g.:
 
 ```
 $ docker run --rm -p 8080 apache/sling:snapshot oak_mongo
@@ -80,6 +80,8 @@ $ docker volume create sling-launcher
 $ docker run --rm -p 8080 -v sling-launcher:/opt/sling/launcher apache/sling:snapshot
 ```
 
+The [docker/](docker/) directory contains sample files related to container-based development.
+
 ## Helper scripts
 
 The `scripts` directory contains helper scripts that will aid with local development by simplifying the use of tools external to the Sling Starter.
diff --git a/docker/docker-compose-mongodb.yaml b/docker/docker-compose-mongodb.yaml
new file mode 100644
index 0000000..fa619d2
--- /dev/null
+++ b/docker/docker-compose-mongodb.yaml
@@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# note that the project needs to be built once with `mvn clean install`
+services:
+    sling:
+        image: apache/sling:snapshot
+        ports:
+            - "8080"
+        links:
+            - mongo
+        environment:
+            - MONGODB_HOST=mongo
+            - MONGODB_PORT=27017
+        command: "oak_mongo"
+    mongo:
+        image: mongo:3.6
diff --git a/docker/docker-compose-tar.yaml b/docker/docker-compose-tar.yaml
new file mode 100644
index 0000000..57facda
--- /dev/null
+++ b/docker/docker-compose-tar.yaml
@@ -0,0 +1,27 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#  http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# note that the project needs to be built once with `mvn clean install`
+services:
+    sling:
+        image: apache/sling:snapshot
+        ports:
+            - "8080"
+        volumes:
+            - sling-repository:/opt/sling/launcher
+volumes:
+    sling-repository: {}