Files
say-it-backend/Dockerfile
T
2020-11-16 21:52:54 +11:00

27 lines
352 B
Docker

FROM golang:1.15-alpine AS build
RUN apk add --no-cache git openssh
ENV GOOS=linux
ENV GOARCH=amd64
WORKDIR /app
COPY . .
RUN go mod download
RUN go build -o say-it main.go
FROM alpine:3.12
RUN apk add --no-cache bash \
&& adduser -D -u 1000 junv
WORKDIR /home/junv
USER junv
COPY --from=build /app/say-it say-it
CMD ["/home/junv/say-it"]