2023-12-26 05:23:51 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								FROM --platform=$BUILDPLATFORM tonistiigi/xx AS xx
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-26 04:35:38 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								FROM --platform=$BUILDPLATFORM golang:1.21-alpine AS build
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								LABEL authors="kbruen"
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								LABEL org.opencontainers.image.source=https://github.com/dancojocaru2000/CfrTrainInfoTelegramBot
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-26 05:23:51 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								RUN echo "@testing https://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN apk add zig@testing
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY --from=xx / /
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								ARG TARGETPLATFORM
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								ENV CGO_ENABLED=1
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-26 04:35:38 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								WORKDIR /app
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY go.mod .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY go.sum .
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN go mod download
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY main.go ./
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY pkg ./pkg/
							 
						 
					
						
							
								
									
										
										
										
											2023-12-26 05:23:51 +01:00 
										
									 
								 
							 
							
								
									
										 
									 
								
							 
							
								 
							 
							
							
								ARG TARGETOS
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								ARG TARGETARCH
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								RUN GOOS=$TARGETOS GOARCH=$TARGETARCH CGO_CFLAGS="-D_LARGEFILE64_SOURCE" CC="zig cc -target $(xx-info march)-$(xx-info os)-$(xx-info libc)" CXX="zig c++ -target $(xx-info march)-$(xx-info os)-$(xx-info libc)" go build -o server && xx-verify server
							 
						 
					
						
							
								
									
										
										
										
											2023-12-26 04:35:38 +01:00 
										
									 
								 
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								FROM scratch
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY --from=build /etc/ssl/certs /etc/ssl/certs
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								WORKDIR /app
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								# COPY static ./static/
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								COPY --from=build /app/server ./
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								ENV DEBUG=false
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							 
							
							
								ENTRYPOINT [ "/app/server" ]