You are here

docker-entrypoint.sh in farmOS 7

#!/bin/bash
set -e

# If the webroot directory is empty, copy from /tmp/www.
if ! [ "$(ls -A /var/www/html/)" ]; then
  echo "farmOS webroot not detected. Copying from pre-built codebase in the Docker image."
  cp -rp /tmp/www/. /var/www/html
fi

# Execute the arguments passed into this script.
echo "Attempting: $@"
exec "$@"

File

docker/dev/docker-entrypoint.sh
View source
  1. #!/bin/bash
  2. set -e
  3. # If the webroot directory is empty, copy from /tmp/www.
  4. if ! [ "$(ls -A /var/www/html/)" ]; then
  5. echo "farmOS webroot not detected. Copying from pre-built codebase in the Docker image."
  6. cp -rp /tmp/www/. /var/www/html
  7. fi
  8. # Execute the arguments passed into this script.
  9. echo "Attempting: $@"
  10. exec "$@"