mirror of
https://github.com/restic/rest-server.git
synced 2025-12-07 09:36:13 -08:00
Docker: various updates
- use exec in entrypoint.sh, get rid of extra shell process - use CMD instead of ENTRYPOINT, so image can be run with /bin/sh arg
This commit is contained in:
19
docker/entrypoint.sh
Executable file
19
docker/entrypoint.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
if [ -z "$DISABLE_AUTHENTICATION" ]; then
|
||||
if [ ! -f "$PASSWORD_FILE" ]; then
|
||||
touch "$PASSWORD_FILE"
|
||||
fi
|
||||
|
||||
if [ ! -s "$PASSWORD_FILE" ]; then
|
||||
echo
|
||||
echo "**WARNING** No user exists, please 'docker exec -it \$CONTAINER_ID create_user'"
|
||||
echo
|
||||
fi
|
||||
else
|
||||
rm -f "$PASSWORD_FILE"
|
||||
fi
|
||||
|
||||
exec rest-server --listen ":80" $OPTIONS --path "$DATA_DIRECTORY"
|
||||
Reference in New Issue
Block a user