Skip to content
Open
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
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
22.19.0
24.19.0
8 changes: 4 additions & 4 deletions src/tools/dockerfile-memo/dockerfile.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Specifies the base image.

```Dockerfile
FROM ubuntu:20.04
FROM node:22-alpine
FROM node:24-alpine@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43
```

### `LABEL`
Expand Down Expand Up @@ -138,7 +138,7 @@ ONBUILD COPY . /app
## 🧪 Example Dockerfile

```Dockerfile
FROM node:22-alpine
FROM node:24-alpine@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43

LABEL maintainer="guillaume@example.com"

Expand Down Expand Up @@ -189,7 +189,7 @@ Dockerfile

```Dockerfile
# Stage 1: Build
FROM node:22-alpine AS builder
FROM node:24-alpine@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
Expand Down Expand Up @@ -243,7 +243,7 @@ Multistage builds help you avoid bloated images:

```Dockerfile
# Build stage
FROM node:22 AS build
FROM node:24@sha256:934240a162082fd8b8a2f90cd5114446443f1eba1c5378f6687167ca405e6584 AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
Expand Down
8 changes: 4 additions & 4 deletions src/tools/dockerfile-memo/dockerfile.zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ INSTRUCTION arguments

```Dockerfile
FROM ubuntu:20.04
FROM node:22-alpine
FROM node:24-alpine@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43
```

### `LABEL`
Expand Down Expand Up @@ -138,7 +138,7 @@ ONBUILD COPY . /app
## 🧪 示例 Dockerfile

```Dockerfile
FROM node:22-alpine
FROM node:24-alpine@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43

LABEL maintainer="guillaume@example.com"

Expand Down Expand Up @@ -189,7 +189,7 @@ Dockerfile

```Dockerfile
# 阶段 1:构建
FROM node:22-alpine AS builder
FROM node:24-alpine@sha256:d32cdf619f63fe0471182d08996dd516c6275bb5fd31ae06e55a570bd9e1ad43 AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
Expand Down Expand Up @@ -243,7 +243,7 @@ COPY --from=builder /app/output /app/output

```Dockerfile
# 构建阶段
FROM node:22 AS build
FROM node:24@sha256:934240a162082fd8b8a2f90cd5114446443f1eba1c5378f6687167ca405e6584 AS build
WORKDIR /app
COPY package*.json ./
RUN npm install
Expand Down