fix check in Dockerfile docker-entrypoint.sh

This commit is contained in:
zliang 2023-08-14 16:30:36 -06:00
parent 8cbb53e7cb
commit 7d96689ae6

View File

@ -94,9 +94,8 @@ RUN \
RUN set -eux; \
echo '#!/bin/sh' > /usr/local/bin/docker-entrypoint.sh; \
echo 'set -e' >> /usr/local/bin/docker-entrypoint.sh; \
echo "# first arg is '-f' or '--some-option'" >> /usr/local/bin/docker-entrypoint.sh; \
echo "# or first arg is `something.conf`" >> /usr/local/bin/docker-entrypoint.sh; \
echo 'if [ "${1#-}" != "$1" ] || [ "${1%.conf}" != "$1" ]; then' >> /usr/local/bin/docker-entrypoint.sh; \
echo "# perpend `keydb-server` if not provided as first argument" >> /usr/local/bin/docker-entrypoint.sh; \
echo 'if [ != "keydb-server" ]' >> /usr/local/bin/docker-entrypoint.sh; \
echo ' set -- keydb-server "$@"' >> /usr/local/bin/docker-entrypoint.sh; \
echo 'fi' >> /usr/local/bin/docker-entrypoint.sh; \
echo "# allow the container to be started with `--user`" >> /usr/local/bin/docker-entrypoint.sh; \