Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Drupal
drupalizer
Commits
c86366ee
Commit
c86366ee
authored
Nov 24, 2016
by
Victor Nikulshin
Browse files
Create user for Drupalizer with custom UID and GID based on environment
parent
9da00541
Changes
1
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
c86366ee
...
...
@@ -3,10 +3,24 @@
FROM
savoirfairelinux/lampd
MAINTAINER
Ernesto Rodriguez Ortiz <ernesto.rodriguezortiz@savoirfairelinuc.com>
# Create user used by Drupalizer tasks
RUN
useradd
--home-dir
/opt/init
--create-home
drupalizer
--shell
/bin/bash
&&
passwd
-d
drupalizer
# Create entrypoint script
RUN
mkdir
-p
/opt/init
RUN
echo
'#!/bin/bash\n
\
\n\
if [[ ! -z "$USER_ID" ]]\n
\
then\n
\
which usermod 2>&1 >/dev/null && usermod -u $USER_ID drupalizer\n
\
service apache2 reload\n
\
fi\n
\
\n\
if [[ ! -z "$GROUP_ID" ]]\n
\
then\n
\
which groupmod 2>&1 >/dev/null && groupmod -g $GROUP_ID drupalizer\n
\
service apache2 reload\n
\
fi\n
\
\n\
exec /bin/sh -c "$*"'
\
>
/opt/init/init.sh
&&
chmod
a+x /opt/init/init.sh
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment