Skip to content

Commit a3d50b8

Browse files
authored
- name: 构建镜像 adockero/node-pm2:node-22.13-pnpm
1 parent d8e3ba3 commit a3d50b8

2 files changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/node.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,44 @@ jobs:
3131
# ########## 构建 ###########################
3232

3333

34+
- name: 构建镜像 adockero/node-pm2:node-22.13-pnpm
35+
uses: docker/build-push-action@v3
36+
with:
37+
# Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
38+
tags: adockero/node-pm2:node-22.13-pnpm
39+
# Path to the Dockerfile (Default is '{path}/Dockerfile')
40+
context: ./node
41+
file: "./node/Dockerfile.pm2"
42+
# Always attempt to pull a newer version of the image
43+
pull: true
44+
push: true
45+
# 构建参数
46+
build-args: |
47+
NODE_VERSION=22.13
48+
NPM_ARGS=pnpm
49+
# APK_ARG=rsync
50+
# Adds labels with git repository information to the built image
51+
labels: true
52+
53+
- name: 构建镜像 adockero/node-pm2:node-22.13
54+
uses: docker/build-push-action@v3
55+
with:
56+
# Comma-delimited list of tags. These will be added to the registry/repository to form the image's tags
57+
tags: adockero/node-pm2:node-22.13
58+
# Path to the Dockerfile (Default is '{path}/Dockerfile')
59+
context: ./node
60+
file: "./node/Dockerfile.pm2"
61+
# Always attempt to pull a newer version of the image
62+
pull: true
63+
push: true
64+
# 构建参数
65+
build-args: |
66+
NODE_VERSION=22.13
67+
# APK_ARG=rsync
68+
# Adds labels with git repository information to the built image
69+
labels: true
70+
71+
3472
- name: 构建镜像 adockero/node-systemd:node-14
3573
uses: docker/build-push-action@v3
3674
with:

node/Dockerfile.pm2

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
ARG FROM_ARG=node:11-alpine
3+
4+
FROM ${FROM_ARG}
5+
6+
ARG NPM_ARGS
7+
8+
# Install pm2
9+
RUN npm install pm2 $NPM_ARGS -g
10+
11+
# Expose ports needed to use Keymetrics.io
12+
EXPOSE 80 443 43554
13+
14+
# Start pm2.json process file
15+
CMD ["pm2-runtime", "start", "pm2.json"]

0 commit comments

Comments
 (0)