mirror of
https://github.com/garethgeorge/backrest.git
synced 2025-10-30 04:07:03 +00:00
feat: add arg forwarding to docker-entrypoint and backrestmon
Some checks failed
Build Snapshot Release / build (push) Has been cancelled
Release Please / release-please (push) Has been cancelled
Test / test-nix (push) Has been cancelled
Test / test-win (push) Has been cancelled
Update Restic / update-restic-version (push) Has been cancelled
Some checks failed
Build Snapshot Release / build (push) Has been cancelled
Release Please / release-please (push) Has been cancelled
Test / test-nix (push) Has been cancelled
Test / test-win (push) Has been cancelled
Update Restic / update-restic-version (push) Has been cancelled
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
FROM golang:1.24-alpine AS builder
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN go build -o /docker-entrypoint ./cmd/docker-entrypoint
|
||||
RUN go build -o /docker-entrypoint -ldflags "-s -w" ./cmd/docker-entrypoint
|
||||
|
||||
|
||||
FROM alpine:latest
|
||||
LABEL org.opencontainers.image.source="https://github.com/garethgeorge/backrest"
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
FROM golang:1.24-alpine AS builder
|
||||
WORKDIR /src
|
||||
COPY . .
|
||||
RUN go build -o /docker-entrypoint ./cmd/docker-entrypoint
|
||||
RUN go build -o /docker-entrypoint -ldflags "-s -w" ./cmd/docker-entrypoint
|
||||
|
||||
FROM alpine:latest AS alpine
|
||||
RUN apk add --no-cache ca-certificates tini-static
|
||||
|
||||
@@ -28,9 +28,11 @@ func main() {
|
||||
os.Stderr.WriteString("No command provided to run.\n")
|
||||
os.Exit(1)
|
||||
}
|
||||
os.Stderr.WriteString("Running command: " + os.Args[1] + " " + fmt.Sprint(os.Args[2:]) + "\n")
|
||||
subcommand := os.Args[1]
|
||||
args := os.Args[2:]
|
||||
os.Stderr.WriteString("Running command: " + subcommand + " " + fmt.Sprint(args) + "\n")
|
||||
|
||||
cmd := exec.Command(os.Args[1], os.Args[2:]...)
|
||||
cmd := exec.Command(subcommand, args...)
|
||||
cmd.Stdout = os.Stdout
|
||||
cmd.Stderr = os.Stderr
|
||||
cmd.Stdin = os.Stdin
|
||||
|
||||
Reference in New Issue
Block a user