Set default config to config directory to allow file system config mapping via directory
This commit is contained in:
parent
edd9651f56
commit
e06b87098f
2 changed files with 17 additions and 7 deletions
22
Dockerfile
22
Dockerfile
|
|
@ -1,13 +1,23 @@
|
|||
FROM golang:1.23.2 as builder
|
||||
WORKDIR /build
|
||||
FROM --platform=$BUILDPLATFORM golang:1.25 AS builder
|
||||
WORKDIR /src
|
||||
|
||||
COPY go.mod go.sum ./
|
||||
RUN go mod download
|
||||
COPY cmd ./cmd
|
||||
COPY config ./config
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o /app/cfdns ./cmd
|
||||
|
||||
COPY cmd ./cmd
|
||||
COPY pkg ./pkg
|
||||
|
||||
ARG TARGETOS
|
||||
ARG TARGETARCH
|
||||
ENV CGO_ENABLED=0
|
||||
|
||||
# Build the binary for the requested OS/arch
|
||||
RUN GOOS=$TARGETOS GOARCH=$TARGETARCH \
|
||||
go build -trimpath -ldflags="-s -w" -o /out/cfdns ./cmd
|
||||
|
||||
# Minimal runtime
|
||||
FROM alpine:latest
|
||||
RUN apk --no-cache add ca-certificates
|
||||
COPY --from=builder /app/cfdns /app/cfdns
|
||||
WORKDIR /app
|
||||
COPY --from=builder /out/cfdns /app/cfdns
|
||||
ENTRYPOINT ["/app/cfdns"]
|
||||
|
|
@ -15,7 +15,7 @@ import (
|
|||
)
|
||||
|
||||
const VERSION = "0.3.0"
|
||||
const DEFAULT_CONFIG_FILE = "cfdns.yaml"
|
||||
const DEFAULT_CONFIG_FILE = "config/cfdns.yaml"
|
||||
|
||||
type CLIFlags struct {
|
||||
ConfigFile string
|
||||
|
|
|
|||
Loading…
Reference in a new issue