mirror of
https://github.com/wahyd4/scraper.git
synced 2026-08-09 05:06:22 +10:00
29 lines
355 B
Docker
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"]
|