-
Notifications
You must be signed in to change notification settings - Fork 252
Open
Description
Bug Report
Problem
The current Dockerfile uses golang:1.12 but the code requires go 1.20 (as specified in go.mod), causing build failures.
Error
cannot load embed: cannot find module providing package embed
ERROR: failed to solve: process "/bin/sh -c go mod download && go build -o etcdkeeper.bin main.go" did not complete successfully: exit code: 1
Environment
- Docker version: Any
- Platform: Any
Steps to Reproduce
- Clone the repository
- Run
docker build -t etcdkeeper . - Build fails with Go version incompatibility
Root Cause
go.modspecifiesgo 1.20DockerfileusesFROM golang:1.12- Go 1.12 doesn't support modern dependencies used in the project
Proposed Solution
Update Dockerfile to use a compatible Go version:
FROM golang:1.21 AS build # Updated from golang:1.12Additional Improvements
- Update Alpine version to
3.18for security - Fix deprecated ENV format
- Use JSON format for CMD
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels