-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
41 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
set -e | ||
|
||
# Create a user and group used to launch processes | ||
# We use the ID 185 for the group as well as for the user. | ||
# This ID is registered static ID for the JBoss EAP product | ||
# on RHEL which makes it safe to use. | ||
groupadd -r $USER -g $UID && useradd -u $UID -r -g root -G $USER -m -d $HOME -s /sbin/nologin -c "$GECOS" $USER | ||
|
||
# OPENJDK-533, OPENJDK-556: correct permissions for OpenShift etc | ||
chmod 0770 $HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
schema_version: 1 | ||
name: org.eclipse.jkube.user | ||
version: 1.0.0 | ||
description: > | ||
Configures the default user and permissions. This module should be included by all images. | ||
Adapted from: | ||
- https://github.com/jboss-container-images/openjdk/blob/d14ec7f363956b73684409c8b6bd9c766507013b/modules/user/ | ||
- https://github.com/jboss-openshift/cct_module/blob/f91fb2f80dd880ed7498d4dfc3afb35dfcef60bd/jboss/container/user/ | ||
envs: | ||
- name: "USER" | ||
value: "jboss" | ||
- name: "UID" | ||
value: &uid 185 | ||
- name: "HOME" | ||
value: "/home/jboss" | ||
- name: "GECOS" | ||
value: "JBoss user" | ||
|
||
packages: | ||
install: | ||
- shadow-utils # groupadd | ||
|
||
execute: | ||
- script: configure.sh | ||
|
||
run: | ||
user: *uid | ||
workdir: "/home/jboss" |