Skip to content

Commit a7b5dc7

Browse files
author
Gabor Lekeny
committed
Revert user back to nobody
1 parent cabe93e commit a7b5dc7

File tree

4 files changed

+11
-21
lines changed

4 files changed

+11
-21
lines changed

Dockerfile

+4-6
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,9 @@ RUN make build
77

88
FROM alpine:3.7
99
RUN apk upgrade --no-cache && \
10-
apk --no-cache add ca-certificates git openssh-client su-exec
11-
RUN addgroup -S katafygio && \
12-
adduser -S -G katafygio katafygio
13-
RUN install -d -o katafygio -g katafygio /var/lib/katafygio/data
10+
apk --no-cache add ca-certificates git openssh-client
11+
RUN install -d -o nobody -g nobody /var/lib/katafygio/data
1412
COPY --from=builder /go/src/github.com/bpineau/katafygio/katafygio /usr/bin/
15-
COPY entrypoint.sh /
1613
VOLUME /var/lib/katafygio
17-
ENTRYPOINT ["/entrypoint.sh"]
14+
USER nobody
15+
ENTRYPOINT ["/usr/bin/katafygio"]

assets/Dockerfile.goreleaser

+4-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
FROM alpine:3.7
22
RUN apk upgrade --no-cache && \
3-
apk --no-cache add ca-certificates git openssh-client su-exec
4-
RUN addgroup -S katafygio && \
5-
adduser -S -G katafygio katafygio
6-
RUN install -d -o katafygio -g katafygio /var/lib/katafygio/data
3+
apk --no-cache add ca-certificates git openssh-client
4+
RUN install -d -o nobody -g nobody /var/lib/katafygio/data
75
COPY katafygio /usr/bin/
8-
COPY entrypoint.sh /
96
VOLUME /var/lib/katafygio
10-
ENTRYPOINT ["/entrypoint.sh"]
7+
USER nobody
8+
ENTRYPOINT ["/usr/bin/katafygio"]

assets/helm-chart/katafygio/templates/deployment.yaml

+3-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@ spec:
1515
labels:
1616
{{ include "katafygio.labels.standard" . | indent 8 }}
1717
spec:
18+
securityContext:
19+
fsGroup: 65534
1820
serviceAccountName: {{ template "katafygio.serviceAccountName" . }}
1921
containers:
2022
- name: {{ .Chart.Name }}
@@ -69,7 +71,7 @@ spec:
6971
{{- if and .Values.gitSshKey .Values.gitUrl }}
7072
volumeMounts:
7173
- name: katafygio-gitssh
72-
mountPath: "/gitssh-secret"
74+
mountPath: "/.ssh"
7375
readOnly: true
7476
{{- end }}
7577
resources:

entrypoint.sh

-8
This file was deleted.

0 commit comments

Comments
 (0)