You've already forked prometheus-fail2ban-exporter
							
							 f6e328a0aa
			
		
	
	f6e328a0aa
	
	
	
		
			
			Add a new method to the application startup to listen for OS shutdown signals and handle them appropriately. A shutdown signal will cause the app to exit immediately. Use correct syntax for the `ENTRYPOINT` field in the Dockerfile to ensure that OS signals get passed down to the running application.
		
			
				
	
	
		
			24 lines
		
	
	
		
			564 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			564 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
| # Using golang:latest instead of alpine because of issues with sqlite3
 | |
| FROM golang:latest AS build
 | |
| 
 | |
| # Create build folder to compile tool
 | |
| WORKDIR /build
 | |
| 
 | |
| # Copy source files to build folder and link to the /go folder
 | |
| COPY . /build
 | |
| RUN ln -s /go/src/ /build/src
 | |
| 
 | |
| # Compile the tool using a Make command
 | |
| RUN make build/docker
 | |
| 
 | |
| 
 | |
| FROM debian:buster-slim
 | |
| 
 | |
| # Create main app folder to run from
 | |
| WORKDIR /app
 | |
| 
 | |
| # Copy compiled binary to release image
 | |
| COPY --from=build /build/src/exporter /app/fail2ban-prometheus-exporter
 | |
| 
 | |
| ENTRYPOINT ["/app/fail2ban-prometheus-exporter"]
 |