mirror of
https://github.com/stakater/Reloader.git
synced 2026-02-28 16:30:20 +00:00
25 lines
515 B
Docker
25 lines
515 B
Docker
FROM golang:1.13.9-alpine
|
|
LABEL maintainer "Stakater Team"
|
|
|
|
RUN apk -v --update \
|
|
--no-cache \
|
|
add git build-base
|
|
|
|
WORKDIR "$GOPATH/src/github.com/stakater/Reloader"
|
|
|
|
COPY go.mod go.sum ./
|
|
|
|
RUN go mod download
|
|
|
|
COPY . .
|
|
|
|
ENV CGO_ENABLED=0 GOOS=linux GOARCH=amd64
|
|
|
|
RUN go build -a --installsuffix cgo --ldflags="-s" -o /Reloader
|
|
|
|
COPY build/package/Dockerfile.run /
|
|
|
|
# Running this image produces a tarball suitable to be piped into another
|
|
# Docker build command.
|
|
CMD tar -cf - -C / Dockerfile.run Reloader
|