You are viewing a plain text version of this content. The canonical link for it is here.
Posted to pr@jena.apache.org by "kinow (via GitHub)" <gi...@apache.org> on 2023/05/30 18:41:30 UTC

[GitHub] [jena] kinow opened a new pull request, #1890: [GH-1889] Use arguments for uid and gid, add group and user, re-work order of commands to make dirs and change ownership

kinow opened a new pull request, #1890:
URL: https://github.com/apache/jena/pull/1890

   GitHub issue resolved #1889
   
   Pull request Description:
   
   Moves `adduser` to final layer only (we were creating and then copying `/etc/passwd`). Runs `addgroup` before, and uses a fixed uid/gid for user and group.
   
   Create base directory, changes ownership, and then switches to the Jena user in Docker. That creates everything else with the correct uid/gid/ownership.
   
   ----
   
    - [ ] Tests are included.
    - [ ] Documentation change and updates are provided for the [Apache Jena website](https://github.com/apache/jena-site/)
    - [x] Commits have been squashed to remove intermediate development commit messages.
    - [x] Key commit messages start with the issue number (GH-xxxx or JENA-xxxx)
   
   By submitting this pull request, I acknowledge that I am making a contribution to the Apache Software Foundation under the terms and conditions of the [Contributor's Agreement](https://www.apache.org/licenses/contributor-agreements.html).
   
   ----
   
   See the [Apache Jena "Contributing" guide](https://github.com/apache/jena/blob/main/CONTRIBUTING.md).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on a diff in pull request #1890: [GH-1889] Use arguments for uid and gid, add group and user, re-work order of commands to make dirs and change ownership

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on code in PR #1890:
URL: https://github.com/apache/jena/pull/1890#discussion_r1213563465


##########
jena-fuseki2/jena-fuseki-docker/Dockerfile:
##########
@@ -89,18 +83,32 @@ ARG FUSEKI_JAR
 
 COPY --from=base /opt/java-minimal /opt/java-minimal
 COPY --from=base /fuseki /fuseki
-COPY --from=base /etc/passwd /etc/passwd
 
 WORKDIR $FUSEKI_DIR
 
 ARG LOGS=${FUSEKI_DIR}/logs
 ARG DATA=${FUSEKI_DIR}/databases
 
+ARG JENA_USER=fuseki
+ARG JENA_GROUP=$JENA_USER
+ARG JENA_GID=1000
+ARG JENA_UID=1000
+
+# Run as this user
+# -H : no home directorry

Review Comment:
   Will push force just to rebase & fix this (copied) typo (s/directorry/directory), then merge :+1: 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on pull request #1890: [GH-1889] Use arguments for uid and gid, add group and user, re-work order of commands to make dirs and change ownership

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on PR #1890:
URL: https://github.com/apache/jena/pull/1890#issuecomment-1568902634

   I adapted this code from the Minimamba docker recipe :+1: 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow merged pull request #1890: [GH-1889] Use arguments for uid and gid, add group and user, re-work order of commands to make dirs and change ownership

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow merged PR #1890:
URL: https://github.com/apache/jena/pull/1890


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org


[GitHub] [jena] kinow commented on a diff in pull request #1890: [GH-1889] Use arguments for uid and gid, add group and user, re-work order of commands to make dirs and change ownership

Posted by "kinow (via GitHub)" <gi...@apache.org>.
kinow commented on code in PR #1890:
URL: https://github.com/apache/jena/pull/1890#discussion_r1213563465


##########
jena-fuseki2/jena-fuseki-docker/Dockerfile:
##########
@@ -89,18 +83,32 @@ ARG FUSEKI_JAR
 
 COPY --from=base /opt/java-minimal /opt/java-minimal
 COPY --from=base /fuseki /fuseki
-COPY --from=base /etc/passwd /etc/passwd
 
 WORKDIR $FUSEKI_DIR
 
 ARG LOGS=${FUSEKI_DIR}/logs
 ARG DATA=${FUSEKI_DIR}/databases
 
+ARG JENA_USER=fuseki
+ARG JENA_GROUP=$JENA_USER
+ARG JENA_GID=1000
+ARG JENA_UID=1000
+
+# Run as this user
+# -H : no home directorry

Review Comment:
   Will push force just to fix this (copied) typo (s/directorry/directory), then merge :+1: 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: pr-unsubscribe@jena.apache.org
For additional commands, e-mail: pr-help@jena.apache.org