Skip to content

Commit

Permalink
use user 1000
Browse files Browse the repository at this point in the history
  • Loading branch information
blockloop committed Aug 28, 2021
1 parent f8fc127 commit 213eb99
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,22 @@ FROM docker.io/node:12-alpine

RUN mkdir /app
WORKDIR /app
RUN adduser \
--disabled-password \
--home /app \
--shell /bin/bash \
hubot \
&& chown hubot /app \
RUN chown 1000 /app \
&& chmod 0700 /app

ADD --chown=hubot bin /app/bin
ADD --chown=hubot external-scripts.json /app/external-scripts.json
ADD --chown=hubot package-lock.json /app/package-lock.json
ADD --chown=hubot package.json /app/package.json
ADD --chown=hubot scripts /app/scripts
ADD --chown=hubot fortunes.txt /app/fortunes.txt
ADD --chown=hubot deep_thoughts.txt /app/deep_thoughts.txt
ADD --chown=1000 bin /app/bin
ADD --chown=1000 external-scripts.json /app/external-scripts.json
ADD --chown=1000 package-lock.json /app/package-lock.json
ADD --chown=1000 package.json /app/package.json
ADD --chown=1000 scripts /app/scripts
ADD --chown=1000 fortunes.txt /app/fortunes.txt
ADD --chown=1000 deep_thoughts.txt /app/deep_thoughts.txt

ENV FORTUNES_FILE /app/fortunes.txt
ENV DEEP_THOUGHTS_FILE /app/deep_thoughts.txt

ENV PATH "$$PATH:/usr/local/bin:/app/node_modules/.bin"
RUN /usr/local/bin/npm install

USER hubot
USER 1000
ENTRYPOINT /app/bin/hubot --adapter slack

0 comments on commit 213eb99

Please sign in to comment.