fix: docker entrypoint.sh
This commit is contained in:
parent
0453978d5f
commit
119637f24c
1 changed files with 4 additions and 2 deletions
|
|
@ -58,8 +58,9 @@ EOF
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
function setup_ubuntu () {
|
function setup_ubuntu () {
|
||||||
|
id ${USER} > /dev/null
|
||||||
# Check the existence of the user, if not exist, create it.
|
# Check the existence of the user, if not exist, create it.
|
||||||
if [ ! $(id ${USER}) ]; then
|
if [ $? -eq 1 ]; then
|
||||||
echo "rpxy: Create user ${USER} with ${USER_ID}:${GROUP_ID}"
|
echo "rpxy: Create user ${USER} with ${USER_ID}:${GROUP_ID}"
|
||||||
groupadd -g ${GROUP_ID} ${USER}
|
groupadd -g ${GROUP_ID} ${USER}
|
||||||
useradd -u ${USER_ID} -g ${GROUP_ID} ${USER}
|
useradd -u ${USER_ID} -g ${GROUP_ID} ${USER}
|
||||||
|
|
@ -81,8 +82,9 @@ function setup_ubuntu () {
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
function setup_alpine () {
|
function setup_alpine () {
|
||||||
|
id ${USER} > /dev/null
|
||||||
# Check the existence of the user, if not exist, create it.
|
# Check the existence of the user, if not exist, create it.
|
||||||
if [ ! $(id ${USER}) ]; then
|
if [ $? -eq 1 ]; then
|
||||||
echo "rpxy: Create user ${USER} with ${USER_ID}:${GROUP_ID}"
|
echo "rpxy: Create user ${USER} with ${USER_ID}:${GROUP_ID}"
|
||||||
addgroup -g ${GROUP_ID} ${USER}
|
addgroup -g ${GROUP_ID} ${USER}
|
||||||
adduser -H -D -u ${USER_ID} -G ${USER} ${USER}
|
adduser -H -D -u ${USER_ID} -G ${USER} ${USER}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue