| 
									
										
										
										
											2024-02-19 01:35:04 +01:00
										 |  |  | FROM golang:latest as builder
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | WORKDIR /app
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | COPY go.mod go.sum ./
 | 
					
						
							|  |  |  | COPY . .
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-02-27 22:27:12 +11:00
										 |  |  | RUN go mod download && \
 | 
					
						
							| 
									
										
										
										
											2024-02-27 22:32:12 +11:00
										 |  |  |     CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main ./pkg/spamasaurusrex
 | 
					
						
							| 
									
										
										
										
											2024-02-19 01:35:04 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | FROM scratch
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | WORKDIR /app
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | COPY --from=builder /app/main .
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-03-08 19:24:19 +11:00
										 |  |  | EXPOSE 8080
 | 
					
						
							| 
									
										
										
										
											2024-02-19 01:35:04 +01:00
										 |  |  | 
 | 
					
						
							|  |  |  | CMD ["./main"]
 |