From 293d2c72e194738d3ab107ff3c39fbb028473f71 Mon Sep 17 00:00:00 2001 From: Robby O'Connor Date: Mon, 8 Oct 2018 22:01:36 -0400 Subject: [PATCH] use COPY --chown=hubot:hubot over ADD [COPY should be used over ADD](https://docs.docker.com/develop/develop-images/dockerfile_best-practices/#add-or-copy) and use "--chown=hubot:hubot" to get around the permissions hacks of the past. --- Dockerfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7e510621d..091f8d3dd 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,12 +19,7 @@ RUN yo hubot --owner="$BOT_OWNER" --name="$BOT_NAME" --description="$BOT_DESC" - sed -i /redis-brain/d ./external-scripts.json && \ npm install hubot-scripts -ADD . /home/hubot/node_modules/hubot-rocketchat - -# hack added to get around owner issue: https://github.com/docker/docker/issues/6119 -USER root -RUN chown hubot:hubot -R /home/hubot/node_modules/hubot-rocketchat -USER hubot +COPY --chown=hubot:hubot . /home/hubot/node_modules/hubot-rocketchat RUN cd /home/hubot/node_modules/hubot-rocketchat && \ npm install && \