docker-entrypoint.sh in metaractor-3.0.1 vs docker-entrypoint.sh in metaractor-3.1.0
- old
+ new
@@ -1,6 +1,19 @@
#!/bin/sh
+
set -e
+
+su-exec ${FIXUID:?Missing FIXUID var}:${FIXGID:?Missing FIXGID var} fixuid
+
+chown_dir() {
+ dir=$1
+ if [[ -d ${dir} ]] && [[ "$(stat -c %u:%g ${dir})" != "${FIXUID}:${FIXGID}" ]]; then
+ echo chown $dir
+ chown metaractor:metaractor $dir
+ fi
+}
+
+chown_dir /usr/local/bundle
if [ "$(which "$1")" = '' ]; then
if [ "$(ls -A /usr/local/bundle/bin)" = '' ]; then
echo 'command not in path and bundler not initialized'
echo 'running bundle install'