mirror of
				https://github.com/dcarrillo/whatismyip.git
				synced 2025-11-03 23:59:09 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			16 lines
		
	
	
		
			303 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
			
		
		
	
	
			16 lines
		
	
	
		
			303 B
		
	
	
	
		
			Docker
		
	
	
	
	
	
FROM golang:1.24-alpine AS builder
 | 
						|
 | 
						|
ARG ARG_VERSION
 | 
						|
ENV VERSION=$ARG_VERSION
 | 
						|
 | 
						|
WORKDIR /app
 | 
						|
COPY . .
 | 
						|
 | 
						|
FROM builder AS build-test-app
 | 
						|
RUN CGO_ENABLED=0 \
 | 
						|
    go build -ldflags="-s -w" -o whatismyip ./cmd
 | 
						|
 | 
						|
FROM scratch AS test
 | 
						|
COPY --from=build-test-app /app/whatismyip /usr/bin/
 | 
						|
ENTRYPOINT ["whatismyip"]
 |