BREAKING CHANGE: only support egg >= 4.0.0 the first app on egg v4 https://github.com/eggjs/egg/issues/3644
18 lines
309 B
Docker
18 lines
309 B
Docker
FROM node:22
|
|
|
|
# Create app directory
|
|
WORKDIR /usr/src/app
|
|
|
|
# Install app dependencies
|
|
COPY . .
|
|
|
|
RUN npm install -g npminstall --registry=https://registry.npmmirror.com \
|
|
&& npminstall -c \
|
|
&& npm run tsc
|
|
|
|
ENV NODE_ENV=production \
|
|
EGG_SERVER_ENV=prod
|
|
|
|
EXPOSE 7001
|
|
CMD ["npm", "run", "start:foreground"]
|