Use alpine for builder in Dockerfile
This commit is contained in:
parent
1b2cb55843
commit
3c72409c5c
@ -1,14 +1,10 @@
|
||||
FROM golang:latest as builder-base
|
||||
FROM golang:alpine as builder-base
|
||||
WORKDIR /app
|
||||
COPY go.mod /app/go.mod
|
||||
COPY go.sum /app/go.sum
|
||||
RUN go mod download
|
||||
COPY . /app
|
||||
RUN CGO_ENABLED=0 go build -o ezshare cmd/ezshare.go
|
||||
|
||||
FROM builder-base as certs
|
||||
VOLUME ["/data"]
|
||||
CMD ["/app/scripts/gencerts.sh"]
|
||||
RUN go build -o ezshare cmd/ezshare.go
|
||||
|
||||
FROM builder-base as cross-compiler
|
||||
VOLUME ["/data"]
|
||||
|
Loading…
Reference in New Issue
Block a user