From 5997a131720c13c718bd891f33e247186737e367 Mon Sep 17 00:00:00 2001 From: koh <33595434+dungnt11@users.noreply.github.com> Date: Wed, 5 Mar 2025 13:06:03 +0700 Subject: [PATCH] =?UTF-8?q?C=E1=BA=ADp=20nh=E1=BA=ADt=20Dockerfile.dev=20v?= =?UTF-8?q?=C3=A0=20lo=E1=BA=A1i=20b=E1=BB=8F=20file=20log=20t=E1=BA=A1m?= =?UTF-8?q?=20th=E1=BB=9Di?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Nâng cấp Golang image lên phiên bản 1.23.3 - Thay đổi cài đặt Air từ air-verse sang phiên bản chính thức (cosmtrek/air@v1.49.0) - Xóa file log tạm thời không cần thiết trong thư mục logs - Tối giản hóa các lệnh RUN trong Dockerfile --- Dockerfile.dev | 10 ++++------ logs/app.log | 2 -- 2 files changed, 4 insertions(+), 8 deletions(-) delete mode 100644 logs/app.log diff --git a/Dockerfile.dev b/Dockerfile.dev index c19b6b1..d642437 100644 --- a/Dockerfile.dev +++ b/Dockerfile.dev @@ -1,12 +1,10 @@ -FROM golang:1.23-alpine +FROM golang:1.23.3-alpine WORKDIR /app -# Cài đặt các công cụ phát triển -RUN apk add --no-cache git make - -# Cài đặt Air cho hot-reload -RUN go install github.com/air-verse/air@latest +# Install build dependencies and air +RUN apk add --no-cache git make && \ + go install github.com/cosmtrek/air@v1.49.0 # Sao chép file go.mod và go.sum COPY go.mod go.sum ./ diff --git a/logs/app.log b/logs/app.log deleted file mode 100644 index a5ee74c..0000000 --- a/logs/app.log +++ /dev/null @@ -1,2 +0,0 @@ -{"level":"INFO","time":"2025-03-03T09:49:31.197Z","caller":"initialize/mysql.go:31","msg":"Initializing MySQL Successfully"} -{"level":"INFO","time":"2025-03-03T09:49:31.198Z","caller":"initialize/run.go:63","msg":"Server đang chạy trên cổng 8080"}