You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
bathyscaphe/build/docker/Dockerfile.tdsh-blacklister

24 lines
489 B
Docker

# build image
FROM golang:1.15.0-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/tdsh-blacklister
# runtime image
FROM alpine:latest
COPY --from=builder /app/tdsh-blacklister /app/
WORKDIR /app/
ENTRYPOINT ["./tdsh-blacklister"]