forked from matrixorigin/neolink.ai-docs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.base
22 lines (19 loc) · 920 Bytes
/
Dockerfile.base
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
## Base ########################################################################
# Use a larger node image to do the build for native deps (e.g., gcc, python)
FROM node:18.19-alpine as base
# Reduce npm log spam and colour during install within Docker
ENV NPM_CONFIG_LOGLEVEL=warn
ENV NPM_CONFIG_COLOR=false
# We'll run the app as the `node` user, so put it in their home directory
WORKDIR /home/node/app
# Copy the source code over
COPY --chown=node:node package.json /home/node/app/
## Development #################################################################
# Define a development target that installs devDeps and runs in dev mode
FROM base as development
WORKDIR /home/node/app
# Upgrade npm and add git tool
RUN npm install -g npm@latest
RUN apk add git
# Install (not ci) with dependencies, and for Linux vs. Linux Musl (which we use for -alpine)
RUN npm install --registry=https://registry.npm.taobao.org