mirror of
				https://github.com/garethgeorge/backrest.git
				synced 2025-10-30 04:07:03 +00:00 
			
		
		
		
	 42054f4a22
			
		
	
	42054f4a22
	
	
		
			
	
		
	
	
		
			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
				
			
		
			
				
	
	
		
			25 lines
		
	
	
		
			785 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			785 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| FROM golang:1.24-alpine AS builder
 | |
| WORKDIR /src
 | |
| COPY . .
 | |
| 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
 | |
| RUN mkdir /tmp-orig
 | |
| COPY backrest /backrest
 | |
| RUN /backrest --install-deps-only
 | |
| RUN mkdir -p /bin && mv /root/.local/share/backrest/restic /bin/restic
 | |
| 
 | |
| FROM scratch
 | |
| LABEL org.opencontainers.image.source="https://github.com/garethgeorge/backrest"
 | |
| COPY --from=alpine /tmp-orig /tmp
 | |
| COPY --from=alpine /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
 | |
| COPY --from=alpine /bin /bin
 | |
| COPY --from=alpine /sbin/tini-static /tini
 | |
| COPY backrest /backrest
 | |
| 
 | |
| COPY --from=builder /docker-entrypoint /docker-entrypoint
 | |
| 
 | |
| ENTRYPOINT ["/tini", "--", "/docker-entrypoint"]
 | |
| CMD ["/backrest"]
 |