22 lines
342 B
Docker
22 lines
342 B
Docker
FROM node:latest
|
|
|
|
ARG UID=987
|
|
ARG GID=987
|
|
|
|
RUN groupadd -g ${GID} chat && useradd -d /usr/src/app -g ${GID} -u ${UID} chat
|
|
|
|
RUN mkdir -p /usr/src/app
|
|
RUN chmod 750 -R /usr/src/app
|
|
COPY package*.json ./
|
|
WORKDIR /usr/src/app
|
|
RUN chown -R chat:chat /usr/src/app
|
|
RUN npm install
|
|
COPY . .
|
|
|
|
EXPOSE 8080
|
|
|
|
USER chat
|
|
|
|
|
|
CMD [ "node", "src/index.js" ]
|