sheriff/Dockerfile

29 строки
453 B
Docker

FROM node as builder
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json yarn.lock ./
RUN yarn install --frozen-lockfile
COPY . .
RUN yarn build
FROM node:slim
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
COPY package.json yarn.lock ./
RUN yarn install --production --frozen-lockfile
COPY --from=builder /usr/src/app/lib ./lib
COPY . .
EXPOSE 8080
CMD [ "node", "lib/index.js" ]