mirror of
https://github.com/wahyd4/badger.git
synced 2026-08-09 05:15:58 +10:00
31 lines
427 B
Docker
31 lines
427 B
Docker
FROM golang:1.14-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 badger main.go
|
|
|
|
FROM alpine:3.11
|
|
|
|
RUN apk add --no-cache bash
|
|
|
|
RUN adduser -D -u 1000 junv
|
|
|
|
WORKDIR /home/junv
|
|
|
|
USER junv
|
|
|
|
COPY --from=build /app/fonts ./fonts
|
|
COPY --from=build /app/badger badger
|
|
COPY --from=build /app/static ./static
|
|
|
|
CMD ["/home/junv/badger"]
|