Skip to content
Snippets Groups Projects
Commit 359fa5c9 authored by Steven Hargrove's avatar Steven Hargrove Committed by Rhys Arkins
Browse files

fix: Prefer /usr/src/app workdir so no need for chown (#1763)

In alpine linux, the `/usr/src` dir is already configured to allow system users read access. Keeping the ownership to root, but permitting the `node` user read access.

**Note**: Maybe a breaking change if users are mounting to `/src` path on docker run.
parent ed20fdff
No related branches found
No related tags found
No related merge requests found
...@@ -3,15 +3,14 @@ FROM node:8.11.0-alpine@sha256:fa3766ad0159e71ccb8970b00c1f2bfc354e22e2c26aa7a14 ...@@ -3,15 +3,14 @@ FROM node:8.11.0-alpine@sha256:fa3766ad0159e71ccb8970b00c1f2bfc354e22e2c26aa7a14
LABEL maintainer="Rhys Arkins <rhys@arkins.net>" LABEL maintainer="Rhys Arkins <rhys@arkins.net>"
LABEL name="renovate" LABEL name="renovate"
WORKDIR /src WORKDIR /usr/src/app/
RUN apk add --quiet --no-cache git openssh-client RUN apk add --quiet --no-cache git openssh-client
COPY package.json . COPY package.json .
COPY yarn.lock . COPY yarn.lock .
RUN yarn install --production && yarn cache clean RUN yarn install --production && yarn cache clean
COPY lib ./lib COPY lib lib
RUN chown -R node:node /src
USER node USER node
ENTRYPOINT ["node", "/src/lib/renovate.js"] ENTRYPOINT ["node", "/usr/src/app/lib/renovate.js"]
CMD ["--help"] CMD ["--help"]
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment