mirror of
https://github.com/creekorful/bathyscaphe
synced 2024-11-19 15:25:44 +00:00
24 lines
462 B
Plaintext
24 lines
462 B
Plaintext
# build image
|
|
FROM golang:1.14.7-alpine as builder
|
|
|
|
RUN apk update && apk upgrade && \
|
|
apk add --no-cache bash git openssh
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy and download dependencies to cache them and faster build time
|
|
COPY go.mod go.sum ./
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
# Test then build app
|
|
RUN go build -v github.com/creekorful/trandoshan/cmd/crawler
|
|
|
|
# runtime image
|
|
FROM alpine:latest
|
|
COPY --from=builder /app/crawler /app/
|
|
|
|
WORKDIR /app/
|
|
|
|
ENTRYPOINT ["./crawler"] |