Added entrypoint to fix permissions

This commit is contained in:
kiloreux 2018-01-04 17:25:30 +01:00
parent 825e9a835a
commit 2eba9ebeba
No known key found for this signature in database
GPG Key ID: 8B81EA3FA91EB758
3 changed files with 9 additions and 1 deletions

View File

@ -24,6 +24,8 @@ spec:
memory: "1Gi"
ports:
- containerPort: 8080
securityContext:
runAsUser: 1000
volumeMounts:
- name: tusd-disk
mountPath: /srv/tusd-data

View File

@ -20,7 +20,8 @@ RUN addgroup -g 1000 tusd \
&& rm -r /go/src/* \
&& apk del git
COPY entrypoint.sh /srv/entrypoint.sh
WORKDIR /srv/tusd-data
EXPOSE 1080
USER tusd
ENTRYPOINT ["/go/bin/tusd","-dir","/srv/tusd-data","--hooks-dir","/srv/tusd-hooks"]
ENTRYPOINT ["/srv/entrypoint.sh"]

5
entrypoint.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
chown tusd:tusd /srv/tusd-data
chown tusd:tusd /srv/tusd-hooks
/go/bin/tusd -dir /srv/tusd-dat --hooks-dir /srv/tusd-hooks