Docker/docker-compose enhancements
The following enhancements have been made to docker/docker-compose * Fixed bug when building the image. * docker-compose up starts the server * Scaffolding inside the container respect the ownership of the files outside it * Volumes are tagged as 'delegated' in order to improve performance for mac/windoze users. * bundler stores packages in a volume. This whay new packages can be added without rebuilding the image: ```bash docker-compose run app bundle install ```
This commit is contained in:
17
scripts/entrypoint.sh
Executable file
17
scripts/entrypoint.sh
Executable file
@@ -0,0 +1,17 @@
|
||||
#!/bin/sh -x
|
||||
|
||||
USER_UID=$(stat -c %u /var/www/consul/Gemfile)
|
||||
USER_GID=$(stat -c %g /var/www/consul/Gemfile)
|
||||
|
||||
export USER_UID
|
||||
export USER_GID
|
||||
|
||||
usermod -u "$USER_UID" consul 2> /dev/null
|
||||
groupmod -g "$USER_GID" consul 2> /dev/null
|
||||
usermod -g "$USER_GID" consul 2> /dev/null
|
||||
|
||||
chown -R -h "$USER_UID" "$BUNDLE_PATH"
|
||||
chgrp -R -h "$USER_GID" "$BUNDLE_PATH"
|
||||
|
||||
/usr/bin/sudo -EH -u consul "$@"
|
||||
|
||||
Reference in New Issue
Block a user