Skip to content
Closed

1221 #140

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/build-docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
push: true
platforms: linux/amd64,linux/arm64
tags: |
ghcr.io/${{ github.repository_owner }}/nodejs:latest
ghcr.io/${{ github.repository_owner }}/argotest:2055
labels: |
org.opencontainers.image.source=https://github.com/${{ github.repository }}
org.opencontainers.image.description=HTTP Server
Expand Down
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,18 @@
FROM node:alpine3.20

WORKDIR /tmp
# 1. 修改这里:将 /tmp 改为 /app
WORKDIR /app

# 2. 复制文件到 /app
COPY . .

EXPOSE 3000/tcp

RUN apk update && apk upgrade &&\
apk add --no-cache openssl curl gcompat iproute2 coreutils &&\
apk add --no-cache bash &&\
chmod +x index.js &&\
RUN apk update && apk upgrade && \
apk add --no-cache openssl curl gcompat iproute2 coreutils && \
apk add --no-cache bash && \
chmod +x index.js && \
npm install

# 3. 此时启动命令会在 /app 目录下寻找 index.js
CMD ["node", "index.js"]
209 changes: 0 additions & 209 deletions README.md

This file was deleted.

Loading