mirror of
https://github.com/wahyd4/say-it-backend.git
synced 2026-08-08 21:07:38 +10:00
27 lines
352 B
Docker
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"]
|