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/05 12:55:21 UTC

[sling-org-apache-sling-starter] branch master updated (b0f58e3 -> 35bf289)

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

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


    from b0f58e3  Update to JCR Jackrabbit User Manager version 2.2.18
     new 538b414  SLING-9638 - Update Starter Docker image to be based on the feature model
     new 35bf289  SLING-9638 - Update Starter Docker image to be based on the feature model

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .dockerignore |  2 ++
 Dockerfile    | 21 +++++++++++----------
 2 files changed, 13 insertions(+), 10 deletions(-)
 create mode 100644 .dockerignore

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

Posted by ro...@apache.org.
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 538b4147dfce162c7b8b26125ad05487ef319fa4
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Feb 4 17:47:08 2022 +0100

    SLING-9638 - Update Starter Docker image to be based on the feature model
    
    Attempt to minimise permission changes.
---
 Dockerfile | 21 +++++++++++----------
 1 file changed, 11 insertions(+), 10 deletions(-)

diff --git a/Dockerfile b/Dockerfile
index 2c2b22c..bc1b014 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -21,21 +21,22 @@ LABEL org.opencontainers.image.authors="dev@sling.apache.org"
 
 EXPOSE 8080
 
-RUN mkdir -p /opt/sling/artifacts
+RUN groupadd --system sling && \
+    useradd --no-log-init --system --gid sling sling && \
+    mkdir /opt/sling && \
+    mkdir /opt/sling/launcher && \
+    mkdir /opt/sling/artifacts && \
+    chown -R sling:sling /opt/sling/launcher
+
+VOLUME /opt/sling/launcher
+
 COPY src/main/container /opt/sling
 COPY target/dependency/org.apache.sling.feature.launcher.jar /opt/sling
 COPY target/artifacts/ /opt/sling/artifacts/
 
-RUN groupadd -r sling && \
-    useradd --no-log-init -r -g sling sling && \
-    mkdir /opt/sling/launcher && \
-    chown sling:sling /opt/sling/launcher
-
 # ensure all files are readable by the sling user
-# for some reason some jar files are 0600 and others are 0644
-RUN find /opt/sling/artifacts -type f | xargs chmod 0644
-
-VOLUME /opt/sling/launcher
+# for some reason some jar files are 0600 while most are 0644
+RUN find /opt/sling/artifacts -type f -perm 0600 | xargs --no-run-if-empty chmod 0644
 
 USER sling:sling
 

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

Posted by ro...@apache.org.
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 35bf289413c0259ea453f38b425aa63bfe2aaf36
Author: Robert Munteanu <ro...@apache.org>
AuthorDate: Fri Feb 4 18:04:50 2022 +0100

    SLING-9638 - Update Starter Docker image to be based on the feature model
    
    Add a basic .dockerignore file. This speeds up the docker image build by not sending
    unneeded files to the Docker daemon.
---
 .dockerignore | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 0000000..0e1bac0
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,2 @@
+target/*.far
+target/docker