Fix docker entrypoint (#174)

This commit is contained in:
Matthieu Mota
2021-06-08 12:58:29 +02:00
committed by GitHub
parent 98ced10737
commit 8c5b52769e
2 changed files with 12 additions and 2 deletions

View File

@@ -20,5 +20,6 @@ ENV username=username
ENV password=password ENV password=password
ENV exposeConfigPath=/src/config/expose.php ENV exposeConfigPath=/src/config/expose.php
CMD sed -i "s|username|${username}|g" ${exposeConfigPath} && sed -i "s|password|${password}|g" ${exposeConfigPath} && php expose serve ${domain} --port ${port} --validateAuthTokens COPY docker-entrypoint.sh /usr/bin/
ENTRYPOINT ["/src/expose"] RUN chmod 755 /usr/bin/docker-entrypoint.sh
ENTRYPOINT ["docker-entrypoint.sh"]

9
docker-entrypoint.sh Normal file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
sed -i "s|username|${username}|g" ${exposeConfigPath} && sed -i "s|password|${password}|g" ${exposeConfigPath}
if [[ $# -eq 0 ]]; then
exec /src/expose serve ${domain} --port ${port} --validateAuthTokens
else
exec /src/expose "$@"
fi