Skip to content

Commit

Permalink
Update dockerfile permissions
Browse files Browse the repository at this point in the history
  • Loading branch information
NickPhura committed Apr 4, 2024
1 parent fa8d991 commit 792cde1
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions api/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,19 @@
# This DockerFile is used for deployments only, please do not change for other purposes. It will break our deployment.
# ####################################################################################################################

FROM node:18
FROM registry.access.redhat.com/ubi9/nodejs-18

ENV HOME=/opt/app-root/src

RUN mkdir -p $HOME

RUN chgrp -R 0 $HOME && \
chmod -R g+rwX $HOME

WORKDIR $HOME

USER 0

# Copy the package files only
# A wildcard is used to ensure both package.json AND package-lock.json are copied where available (npm@5+)
COPY ./package*.json ./
Expand All @@ -18,7 +23,7 @@ COPY ./package*.json ./
# RUN npm install --only=production
RUN npm install

ENV PATH /opt/rh/rh-nodejs8/root/usr/bin:${HOME}/node_modules/.bin/:${HOME}/app.npm-global/bin/:${HOME}/bin:${HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV PATH ${HOME}/node_modules/.bin/:${HOME}/.npm-global/bin/:${HOME}/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

# Copy the rest of the files
COPY . ./
Expand All @@ -34,5 +39,7 @@ VOLUME ${HOME}

EXPOSE 6100

USER 1001

# Application Entry point
CMD ["npm", "run", "start"]

0 comments on commit 792cde1

Please sign in to comment.