mirror of https://github.com/jetkvm/kvm.git
19 lines
390 B
Docker
19 lines
390 B
Docker
# syntax=docker/dockerfile:1
|
|
FROM --platform=${BUILDPLATFORM} golang:1.25.1-trixie AS builder
|
|
|
|
ENV GOTOOLCHAIN=local
|
|
ENV GOPATH=/go
|
|
ENV PATH=$GOPATH/bin:/usr/local/go/bin:$PATH
|
|
|
|
COPY install-deps.sh /install-deps.sh
|
|
RUN /install-deps.sh
|
|
|
|
# Create build directory
|
|
RUN mkdir -p /build/
|
|
|
|
# Copy go.mod and go.sum
|
|
COPY go.mod go.sum /build/
|
|
|
|
WORKDIR /build
|
|
|
|
RUN go mod download && go mod verify |