glider/Dockerfile

15 lines
326 B
Docker
Raw Normal View History

# Build Stage
2024-08-15 00:10:25 +08:00
FROM golang:1.23-alpine AS build-env
2020-09-25 13:01:09 +08:00
ADD . /src
2022-01-27 17:15:04 +08:00
RUN apk --no-cache add git \
&& cd /src && go build -v -ldflags "-s -w"
# Final Stage
2020-09-25 13:01:09 +08:00
FROM alpine
COPY --from=build-env /src/glider /app/
WORKDIR /app
RUN apk -U upgrade --no-cache \
&& apk --no-cache add ca-certificates
USER 1000
2020-09-25 13:01:09 +08:00
ENTRYPOINT ["./glider"]