mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 05:46:28 +02:00
👷 Build with a Dockerfile
This commit is contained in:
36
Dockerfile
Normal file
36
Dockerfile
Normal file
@@ -0,0 +1,36 @@
|
||||
# App build
|
||||
FROM node:20-alpine as build-stage
|
||||
|
||||
## Enable corepack for proper version of YARN
|
||||
RUN corepack enable
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apk add --no-cache \
|
||||
libstdc++ \
|
||||
build-base \
|
||||
libtool \
|
||||
autoconf \
|
||||
automake \
|
||||
elfutils-dev \
|
||||
make \
|
||||
cmake \
|
||||
libcurl \
|
||||
python3 \
|
||||
nasm \
|
||||
libjpeg-turbo-dev
|
||||
|
||||
ENV NODE_OPTIONS="--max_old_space_size=4096"
|
||||
|
||||
## Copy file for YARN then install all deps
|
||||
COPY .yarnrc.yml yarn.lock* package.json ./
|
||||
RUN yarn install --frozen-lockfile
|
||||
|
||||
COPY . .
|
||||
|
||||
## Build the app
|
||||
RUN yarn run build
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["yarn", "start"]
|
Reference in New Issue
Block a user