Skip to content

Commit

Permalink
Merge pull request #95 from AuScalableDroneCloud/non-root
Browse files Browse the repository at this point in the history
Run as non-root user
  • Loading branch information
pierotofy authored Mar 31, 2022
2 parents 437ebab + 1f2b2af commit ef6b8f3
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@ RUN apt update && apt install -y telnet curl && \
curl -L https://github.com/JonasProgrammer/docker-machine-driver-hetzner/releases/download/2.0.1/docker-machine-driver-hetzner_2.0.1_linux_amd64.tar.gz | tar -xz --directory=/tmp && \
install --mode +x /tmp/docker-machine-driver-hetzner /usr/local/bin/

COPY . /var/www
RUN mkdir /var/www
WORKDIR "/var/www"
COPY --chown=node:node . /var/www

RUN npm install

RUN chown -R node:node /var/www

USER node

VOLUME ["/var/www/data"]
ENTRYPOINT ["/usr/local/bin/node", "/var/www/index.js"]

0 comments on commit ef6b8f3

Please sign in to comment.