Skip to content

Commit aa6a901

Browse files
committed
chore(dockerfile): support alinode and yarn 2
1 parent f4a5673 commit aa6a901

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

docker/alinode/Dockerfile

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM registry.cn-hangzhou.aliyuncs.com/aliyun-node/alinode:latest
2+
ENV NODE_ENV production
3+
WORKDIR /usr/src/app
4+
COPY . .
5+
RUN yarn workspaces focus --production && mv .yarn .pnp.js .
6+
VOLUME [ "./data" ]
7+
EXPOSE 8000
8+
CMD yarn start
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
FROM node:14
22
ENV NODE_ENV production
33
WORKDIR /usr/src/app
4-
COPY ["package.json", "yarn.lock", "./"]
5-
RUN yarn --prod && mv node_modules ../
64
COPY . .
5+
RUN yarn workspaces focus --production && mv .yarn .pnp.js .
76
VOLUME [ "./data" ]
87
EXPOSE 8000
98
CMD yarn start

0 commit comments

Comments
 (0)