Commit b6616942 authored by nanahira's avatar nanahira

non-root user

parent 5416c0c9
Pipeline #3252 failed with stages
in 28 minutes and 21 seconds
...@@ -8,12 +8,17 @@ RUN apt-get update \ ...@@ -8,12 +8,17 @@ RUN apt-get update \
&& apt-get update \ && apt-get update \
&& apt-get install -y python3 build-essential google-chrome-stable fonts-ipafont-gothic fonts-wqy-microhei fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \ && apt-get install -y python3 build-essential google-chrome-stable fonts-ipafont-gothic fonts-wqy-microhei fonts-wqy-zenhei fonts-thai-tlwg fonts-kacst fonts-freefont-ttf libxss1 \
--no-install-recommends \ --no-install-recommends \
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* && rm -rf /tmp/* /var/tmp/* /var/lib/apt/lists/* \
&& groupadd -r mathweb && useradd -r -g mathweb -G audio,video mathweb \
&& mkdir -p /home/mathweb/Downloads \
&& chown -R mathweb:mathweb /home/mathweb
WORKDIR /usr/src/app USER mathweb
COPY ./package*.json ./
WORKDIR /home/mathweb/app
COPY --chown=mathweb:mathweb ./package*.json ./
RUN npm ci RUN npm ci
COPY . ./ COPY --chown=mathweb:mathweb . ./
RUN npm run build RUN npm run build
CMD ["npm", "run", "start:prod"] CMD ["npm", "run", "start:prod"]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment