Skip to content

Commit 1f48a18

Browse files
Use go base image instead of ubuntu
1 parent 26c9fe5 commit 1f48a18

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

docker_ci/ubuntu.Dockerfile

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
# Use Ubuntu latest as base image
2-
FROM ubuntu:latest
1+
# Use official Go 1.24 image as base
2+
FROM golang:1.24-bookworm
33

44
# Set environment variables
5-
ENV DEBIAN_FRONTEND=noninteractive
6-
ENV GO_VERSION=1.24.2
7-
ENV GOPATH=/go
8-
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
95
ENV CGO_ENABLED=0
106
ENV GOOS=linux
117
ENV GOARCH=amd64
@@ -25,10 +21,6 @@ RUN apt-get update && apt-get install -y \
2521
netcat-openbsd \
2622
&& rm -rf /var/lib/apt/lists/*
2723

28-
# Install Go
29-
RUN wget -q https://go.dev/dl/go${GO_VERSION}.linux-amd64.tar.gz \
30-
&& tar -C /usr/local -xzf go${GO_VERSION}.linux-amd64.tar.gz \
31-
&& rm go${GO_VERSION}.linux-amd64.tar.gz
3224

3325
# Install Redis
3426
RUN curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg \

0 commit comments

Comments
 (0)