You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by GitBox <gi...@apache.org> on 2019/03/11 08:13:12 UTC
[GitHub] [tinkerpop] FlorianHockmann commented on a change in pull request
#1080: TINKERPOP-2174 Improve Docker Image Security
FlorianHockmann commented on a change in pull request #1080: TINKERPOP-2174 Improve Docker Image Security
URL: https://github.com/apache/tinkerpop/pull/1080#discussion_r264037802
##########
File path: gremlin-console/Dockerfile
##########
@@ -15,17 +15,21 @@
# specific language governing permissions and limitations
# under the License.
-FROM openjdk:8u151-jre-alpine3.7
+FROM openjdk:8-jre-alpine
+
+LABEL maintainer="dev@tinkerpop.apache.org"
ARG GREMLIN_CONSOLE_DIR
-RUN apk add --update \
- bash \
- && rm -rf /var/cache/apk/*
+RUN apk add --no-cache --update bash
COPY src/main/docker/docker-entrypoint.sh /
COPY ${GREMLIN_CONSOLE_DIR} /opt/gremlin-console
WORKDIR /opt/gremlin-console
+RUN addgroup -S gremlin && adduser -S -s /bin/false -G gremlin gremlin
+RUN chown -R gremlin:gremlin /opt/gremlin-console
Review comment:
It should also be possible to add this `chown` directly to the `COPY` command above:
```
COPY --chown=gremlin:gremlin ${GREMLIN_CONSOLE_DIR} /opt/gremlin-console
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services