|
@ -1,6 +1,6 @@ |
|
|
## 1. Build Server |
|
|
## 1. Build Server |
|
|
# Use Go 1.14 |
|
|
# Use Go 1.14 |
|
|
FROM golang:1.14 AS build-server |
|
|
|
|
|
|
|
|
FROM golang:1.16 AS build-server |
|
|
|
|
|
|
|
|
# Load repository into docker |
|
|
# Load repository into docker |
|
|
WORKDIR /project/ |
|
|
WORKDIR /project/ |
|
@ -12,10 +12,12 @@ RUN go generate ./... |
|
|
# Build server and tools (CGO disabled to make them 100% static) |
|
|
# Build server and tools (CGO disabled to make them 100% static) |
|
|
ENV CGO_ENABLED 0 |
|
|
ENV CGO_ENABLED 0 |
|
|
RUN go build -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-server ./cmd/rpdata-server |
|
|
RUN go build -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-server ./cmd/rpdata-server |
|
|
|
|
|
RUN go build -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-dump ./cmd/rpdata-dump |
|
|
|
|
|
RUN go build -installsuffix cgo -ldflags="-s -w" -o /binaries/rpdata-restore ./cmd/rpdata-restore |
|
|
|
|
|
|
|
|
## 2. Distribute |
|
|
## 2. Distribute |
|
|
# Use alpine linux |
|
|
# Use alpine linux |
|
|
FROM alpine:3.12 |
|
|
|
|
|
|
|
|
FROM alpine:3.13 |
|
|
|
|
|
|
|
|
# Install certificates to enable HTTPS GET requests, and tzdata for log imports. |
|
|
# Install certificates to enable HTTPS GET requests, and tzdata for log imports. |
|
|
RUN apk add --no-cache ca-certificates tzdata |
|
|
RUN apk add --no-cache ca-certificates tzdata |
|
|