mirror of
https://github.com/Luzifer/nginx-sso.git
synced 2024-12-20 04:41:17 +00:00
[#79] Fix Docker image broken by user change
- Properly check file existence (`-f`, not `-d`) - Create and chown the data directory in case no mount is present closes #79 Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
1cd016d4e0
commit
4fca15fa21
2 changed files with 4 additions and 2 deletions
|
@ -21,7 +21,9 @@ RUN set -ex \
|
|||
&& apk --no-cache add \
|
||||
bash \
|
||||
ca-certificates \
|
||||
dumb-init
|
||||
dumb-init \
|
||||
&& mkdir /data \
|
||||
&& chown -R 1000:1000 /data
|
||||
|
||||
COPY --from=builder /go/bin/nginx-sso /usr/local/bin/
|
||||
COPY --from=builder /go/src/github.com/Luzifer/nginx-sso/config.yaml /usr/local/share/nginx-sso/
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
set -euo pipefail
|
||||
|
||||
# Copy frontend if not available
|
||||
[ -d /data/frontend/index.html ] || cp -r /usr/local/share/nginx-sso/frontend /data/
|
||||
[ -f /data/frontend/index.html ] || cp -r /usr/local/share/nginx-sso/frontend /data/
|
||||
|
||||
[ -e /data/config.yaml ] || {
|
||||
cp /usr/local/share/nginx-sso/config.yaml /data/config.yaml
|
||||
|
|
Loading…
Reference in a new issue