Files
polaris/Dockerfile
DDSRem c42f9637fb feat: refactor ci
- Docker images support amd64 and arm64 architectures
- The web interface is built using github actions
- Use Alpine as the base image to compress the image size
2024-07-22 13:57:24 +08:00

24 lines
365 B
Docker

FROM golang:1.22-alpine3.20 as builder
# 启用go module
ENV GO111MODULE=on \
GOPROXY=https://goproxy.cn,direct
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o polaris ./cmd/
FROM alpine:3.20
WORKDIR /app
RUN apk add --no-cache bash ca-certificates
COPY --from=builder /app/polaris .
EXPOSE 8080
ENTRYPOINT ["./polaris"]