Skip to content

Commit

Permalink
feat:dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
gzydong committed Jan 3, 2025
1 parent 9195568 commit 1b81335
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ FROM golang:1.23.1-alpine AS builder
# 设置工作目录
WORKDIR /builder

ARG IMAGE_TAG
# 定义构建参数并提供默认值
ARG IMAGE_TAG=latest

# 添加版本标签
LABEL version=${IMAGE_TAG}

# 将 go.mod 和 go.sum 文件复制到工作目录
COPY go.mod go.sum ./
Expand Down

0 comments on commit 1b81335

Please sign in to comment.