mirror of
https://github.com/ente-io/ente.git
synced 2025-07-01 13:13:35 +00:00
## Description feat: update to use go1.23 --- relates to https://github.com/Homebrew/homebrew-core/pull/201919 (homebrew side always use latest go for building the artifact) also love a new cli release for some patches so that we can proceed with the homebrew PR Signed-off-by: Rui Chen <rui@chenrui.dev>
25 lines
579 B
Docker
25 lines
579 B
Docker
FROM golang:1.23-alpine3.21 AS builder
|
|
RUN apk add --no-cache gcc musl-dev git build-base pkgconfig libsodium-dev
|
|
|
|
ENV GOOS=linux
|
|
|
|
WORKDIR /etc/ente/
|
|
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
# the --mount option requires BuildKit. Refer to https://docs.docker.com/go/buildkit/ to learn how to build images with BuildKit enabled
|
|
RUN --mount=type=cache,target=/root/.cache/go-build \
|
|
go build -o ente-cli main.go
|
|
|
|
FROM alpine:3.21
|
|
RUN apk add libsodium-dev
|
|
COPY --from=builder /etc/ente/ente-cli .
|
|
|
|
ARG GIT_COMMIT
|
|
ENV GIT_COMMIT=$GIT_COMMIT
|
|
|
|
CMD ["./ente-cli"]
|