You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							27 lines
						
					
					
						
							465 B
						
					
					
				
			
		
		
		
			
			
			
				
					
				
				
					
				
			
		
		
	
	
							27 lines
						
					
					
						
							465 B
						
					
					
				
								#####################
							 | 
						|
								## 1. Build server ##
							 | 
						|
								#####################
							 | 
						|
								FROM golang:1.17 AS build-server
							 | 
						|
								
							 | 
						|
								WORKDIR /project
							 | 
						|
								COPY . .
							 | 
						|
								
							 | 
						|
								ENV CGO_ENABLED 0
							 | 
						|
								
							 | 
						|
								RUN go mod download
							 | 
						|
								RUN go build -ldflags "-w -s" -o /build/lucifer cmd/server/main.go
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								
							 | 
						|
								###################
							 | 
						|
								## 2. Run server ##
							 | 
						|
								###################
							 | 
						|
								FROM alpine:3.14.2
							 | 
						|
								
							 | 
						|
								# Add results from previous builds
							 | 
						|
								COPY --from=build-server /build/lucifer /usr/bin/lucifer
							 | 
						|
								
							 | 
						|
								RUN apk add --no-cache tzdata
							 | 
						|
								
							 | 
						|
								# Run server
							 | 
						|
								CMD lucifer
							 |