init (#1)
Reviewed-on: #1 Co-authored-by: Tobias Trabelsi <lerentis@uploadfilter24.eu> Co-committed-by: Tobias Trabelsi <lerentis@uploadfilter24.eu>
This commit is contained in:
		
							
								
								
									
										18
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										18
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,18 @@ | ||||
| FROM golang:1.21 as build | ||||
|  | ||||
| WORKDIR /app | ||||
|  | ||||
| COPY . . | ||||
|  | ||||
| RUN go mod tidy && CGO_ENABLED=0 GOOS=linux go build -a -tags netgo -ldflags '-w -extldflags "-static"' -o metallb-ip-floater ./cmd/ | ||||
|  | ||||
| FROM scratch | ||||
|  | ||||
| COPY --from=build /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/ca-certificates.crt | ||||
| COPY --from=build /etc/passwd /etc/passwd | ||||
| COPY --from=build /etc/group /etc/group | ||||
| COPY --from=build --chown=65534:65534 /app/metallb-ip-floater /usr/local/bin/metallb-ip-floater | ||||
|  | ||||
| USER nobody | ||||
|  | ||||
| ENTRYPOINT ["/usr/local/bin/metallb-ip-floater"] | ||||
		Reference in New Issue
	
	Block a user