Files
scraper/Dockerfile
T
2020-05-07 11:02:36 +10:00

29 lines
355 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 scraper 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/scraper scraper
CMD ["/home/junv/scraper"]