nws/Dockerfile

17 lines
294 B
Docker
Raw Normal View History

2024-07-22 21:00:21 +00:00
FROM golang:1.21-alpine as builder
ADD . /build/
WORKDIR /build
RUN apk add --no-cache git bash openssh-client && \
2024-08-27 21:50:05 +00:00
go build -o nws cmd/nws/*.go
2024-07-22 21:00:21 +00:00
#building finished. Now extracting single bin in second stage.
FROM alpine
2024-08-27 21:50:05 +00:00
COPY --from=builder /build/nws /app/
2024-07-22 21:00:21 +00:00
WORKDIR /app
2024-08-27 21:50:05 +00:00
CMD ["./nws"]