| 
									
										
										
										
											2025-02-18 08:26:05 +01:00
										 |  |  | FROM golang:alpine AS deps
 | 
					
						
							| 
									
										
										
										
											2024-07-25 18:48:25 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | WORKDIR /app
 | 
					
						
							| 
									
										
										
										
											2025-02-18 08:26:05 +01:00
										 |  |  | COPY go.mod go.sum ./
 | 
					
						
							|  |  |  | RUN sed -i '/replace/d' go.mod
 | 
					
						
							|  |  |  | RUN go mod download -x
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #----------------------------------------------------------------------------------------------
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | FROM golang:alpine AS builder
 | 
					
						
							|  |  |  | LABEL maintainer="IRT PFN"
 | 
					
						
							|  |  |  | ENV DOCKER_ENVIRONMENT=true | 
					
						
							|  |  |  | WORKDIR /app
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | COPY --from=deps /go/pkg /go/pkg
 | 
					
						
							|  |  |  | COPY --from=deps /app/go.mod /app/go.sum ./
 | 
					
						
							| 
									
										
										
										
											2025-02-14 12:00:29 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-07-25 18:48:25 +02:00
										 |  |  | COPY . .
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | RUN go build .
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-02-14 12:00:29 +01:00
										 |  |  | FROM scratch
 | 
					
						
							| 
									
										
										
										
											2024-07-25 18:48:25 +02:00
										 |  |  | 
 | 
					
						
							|  |  |  | WORKDIR /app
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-14 18:22:31 +02:00
										 |  |  | COPY --from=builder /app/oc-monitord .
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | ENTRYPOINT ["./oc-monitord"]
 |