Skip to content
This repository was archived by the owner on Dec 5, 2023. It is now read-only.

Commit a8675b0

Browse files
author
Szajerski Krzysztof
committed
Avoid granting Linux capabilities
1 parent 97545f4 commit a8675b0

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

docker/catalogue/Dockerfile

+4-6
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,14 @@ ENV SERVICE_USER=myuser \
1515
SERVICE_GID=10001
1616

1717
RUN addgroup -g ${SERVICE_GID} ${SERVICE_GROUP} && \
18-
adduser -g "${SERVICE_NAME} user" -D -H -G ${SERVICE_GROUP} -s /sbin/nologin -u ${SERVICE_UID} ${SERVICE_USER} && \
19-
apk add --update libcap
18+
adduser -g "${SERVICE_NAME} user" -D -H -G ${SERVICE_GROUP} -s /sbin/nologin -u ${SERVICE_UID} ${SERVICE_USER}
2019

2120
WORKDIR /
2221
COPY --from=0 /app /app
2322
COPY images/ /images/
2423

2524
RUN chmod +x /app && \
26-
chown -R ${SERVICE_USER}:${SERVICE_GROUP} /app /images && \
27-
setcap 'cap_net_bind_service=+ep' /app
25+
chown -R ${SERVICE_USER}:${SERVICE_GROUP} /app /images
2826

2927
USER ${SERVICE_USER}
3028

@@ -42,5 +40,5 @@ LABEL org.label-schema.vendor="Weaveworks" \
4240
org.label-schema.vcs-ref="${COMMIT}" \
4341
org.label-schema.schema-version="1.0"
4442

45-
CMD ["/app", "-port=80"]
46-
EXPOSE 80
43+
CMD ["/app", "-port=8080"]
44+
EXPOSE 8080

0 commit comments

Comments
 (0)