Skip to content

fix: update Go version in Dockerfile from 1.22 to 1.26#41

Merged
yuhan6665 merged 1 commit into
XTLS:mainfrom
larinkonstantin:fix/dockerfile-go-version
May 30, 2026
Merged

fix: update Go version in Dockerfile from 1.22 to 1.26#41
yuhan6665 merged 1 commit into
XTLS:mainfrom
larinkonstantin:fix/dockerfile-go-version

Conversation

@larinkonstantin
Copy link
Copy Markdown
Contributor

Fixes #37

PROBLEM
Building the Docker image fails because go.mod requires Go 1.26, but the Dockerfile uses golang:1.22-alpine:

 => [build 3/4] COPY . .                                                                                                                                                                                                             0.1s
 => ERROR [build 4/4] RUN go build -o RealiTLScanner .                                                                                                                                                                                    0.2s
------
 > [build 4/4] RUN go build -o RealiTLScanner .:
0.137 go: go.mod requires go >= 1.26 (running go 1.22.12; GOTOOLCHAIN=local)
------
Dockerfile:4
--------------------
   2 |     WORKDIR /src
   3 |     COPY . .
   4 | >>> RUN go build -o RealiTLScanner .
   5 |
   6 |     FROM alpine:latest
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c go build -o RealiTLScanner ." did not complete successfully: exit code: 1

FIX
Update the base image in Dockerfile to match the version required by go.mod

@yuhan6665 yuhan6665 merged commit e5e1147 into XTLS:main May 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dockerfile golang version

2 participants