2022-05-22 12:56:56 -04:00
|
|
|
# This Dockerfile was created merely to build the app through CI. It might work
|
|
|
|
# for local builds, but is not guaranteed.
|
|
|
|
|
|
|
|
# build the app with Node.js version 16
|
|
|
|
FROM node:16
|
|
|
|
|
|
|
|
# set working directory of the build
|
|
|
|
WORKDIR /usr/src/app
|
|
|
|
|
|
|
|
# install dependencies
|
|
|
|
RUN apt update && \
|
2022-05-22 12:58:56 -04:00
|
|
|
apt install -y ruby ruby-dev rpm && \
|
2022-05-22 12:56:56 -04:00
|
|
|
gem install sass
|
|
|
|
|
|
|
|
# make sure node_modules and public exist so we can ensure it's own by the right user
|
|
|
|
RUN mkdir /usr/src/app/{node_modules,public}
|
|
|
|
|
2022-05-22 13:20:10 -04:00
|
|
|
RUN chown -R node /usr/src/app
|
|
|
|
|
|
|
|
USER node
|
|
|
|
|
2022-05-22 13:22:56 -04:00
|
|
|
RUN npm -g config set user node
|
|
|
|
|
2022-05-22 12:56:56 -04:00
|
|
|
VOLUME /usr/src/app/node_modules
|
|
|
|
VOLUME /usr/src/app/public
|