blob: c35d87c59f122deeba03c56fbfbe07bdd065c23b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
FROM golang:1.18-alpine as builder
RUN mkdir /build
ADD . /build/
WORKDIR /build
# Go 1.18 introduced a compile-time dependency for Git unless `-buildvcs=false` is provided
RUN CGO_ENABLED=0 GOOS=linux go build -a -buildvcs=false -installsuffix cgo -ldflags '-extldflags "-static" -s -w' -o main github.com/codemicro/walrss/walrss
FROM alpine
COPY --from=builder /build/main /
WORKDIR /run
ENV WALRSS_DIR /run
CMD ["../main"]
|