mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-12-23 19:28:28 +00:00
21 lines
407 B
Docker
21 lines
407 B
Docker
FROM golang:1.13-alpine
|
|
|
|
# Build dependencies
|
|
RUN apk --no-cache update
|
|
RUN apk --no-cache add alpine-sdk
|
|
|
|
WORKDIR /src
|
|
|
|
# Copy over dependency file and download it if files changed
|
|
# This allows build caching and faster re-builds
|
|
COPY go.mod .
|
|
COPY go.sum .
|
|
RUN go mod download
|
|
|
|
# Add rest of the source and build
|
|
COPY . .
|
|
RUN make all
|
|
|
|
# Copy to /opt/ so we can extract files later
|
|
RUN cp build/* /opt/
|