Commit permissions fix

This commit is contained in:
kiloreux 2018-01-04 19:00:38 +01:00
parent cb040c9afd
commit 319f961706
No known key found for this signature in database
GPG Key ID: 8B81EA3FA91EB758
3 changed files with 7 additions and 6 deletions

View File

@ -26,6 +26,7 @@ spec:
- containerPort: 8080 - containerPort: 8080
securityContext: securityContext:
runAsUser: 1000 runAsUser: 1000
fsGroup: 1000
volumeMounts: volumeMounts:
- name: tusd-disk - name: tusd-disk
mountPath: /srv/tusd-data mountPath: /srv/tusd-data

View File

@ -5,7 +5,9 @@ COPY . /go/src/github.com/tus/tusd/
# Create app directory # Create app directory
RUN cd /go/src/github.com/tus/tusd \ RUN addgroup -g 1000 tusd \
&& adduser -u 1000 -G tusd -s /bin/sh -D tusd \
&& cd /go/src/github.com/tus/tusd \
&& apk add --no-cache \ && apk add --no-cache \
git \ git \
&& go get -d -v ./... \ && go get -d -v ./... \
@ -15,10 +17,11 @@ RUN cd /go/src/github.com/tus/tusd \
-ldflags="-X github.com/tus/tusd/cmd/tusd/cli.VersionName=${version} -X github.com/tus/tusd/cmd/tusd/cli.GitCommit=${commit} -X 'github.com/tus/tusd/cmd/tusd/cli.BuildDate=$(date --utc)'" \ -ldflags="-X github.com/tus/tusd/cmd/tusd/cli.VersionName=${version} -X github.com/tus/tusd/cmd/tusd/cli.GitCommit=${commit} -X 'github.com/tus/tusd/cmd/tusd/cli.BuildDate=$(date --utc)'" \
-o "/go/bin/tusd" ./cmd/tusd/main.go \ -o "/go/bin/tusd" ./cmd/tusd/main.go \
&& mkdir -p /srv/tusd-hooks \ && mkdir -p /srv/tusd-hooks \
&& mkdir -p /srv/tusd-data \
&& chown tusd:tusd /srv/tusd-data \
&& rm -r /go/src/* \ && rm -r /go/src/* \
&& apk del git && apk del git
COPY entrypoint.sh /srv/entrypoint.sh
WORKDIR /srv/tusd-data WORKDIR /srv/tusd-data
EXPOSE 1080 EXPOSE 1080
ENTRYPOINT ["/srv/entrypoint.sh"] ENTRYPOINT ["/go/bin/tusd","-dir","/srv/tusd-data","--hooks-dir","/srv/tusd-hooks"]

View File

@ -1,3 +0,0 @@
#!/bin/sh
/go/bin/tusd -dir /srv/tusd-data --hooks-dir /srv/tusd-hooks