Solved problems with Docker
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Creating multi-stage build for production
|
||||
FROM node:18-alpine as build
|
||||
FROM node:18-alpine3.18 as build
|
||||
RUN apk update && apk add --no-cache build-base gcc autoconf automake zlib-dev libpng-dev vips-dev git > /dev/null 2>&1
|
||||
ENV NODE_ENV=production
|
||||
|
||||
@@ -8,12 +8,13 @@ COPY package.json yarn.lock ./
|
||||
RUN yarn global add node-gyp
|
||||
RUN yarn config set network-timeout 600000 -g && yarn install --production
|
||||
ENV PATH /opt/node_modules/.bin:$PATH
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /opt/app
|
||||
COPY . .
|
||||
RUN yarn build
|
||||
|
||||
# Creating final production image
|
||||
FROM node:18-alpine
|
||||
FROM node:18-alpine3.18
|
||||
RUN apk add --no-cache vips-dev
|
||||
ENV NODE_ENV=production
|
||||
WORKDIR /opt/
|
||||
|
||||
Reference in New Issue
Block a user