| 
									
										
										
										
											2024-11-26 10:49:31 +00:00
										 |  |  | FROM golang:1.23-alpine AS builder | 
					
						
							|  |  |  | # | 
					
						
							|  |  |  | ENV GO111MODULE=on \ | 
					
						
							|  |  |  |     CGO_ENABLED=0 \ | 
					
						
							|  |  |  |     GOOS=linux | 
					
						
							| 
									
										
										
										
											2024-02-28 18:07:22 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # Include dist | 
					
						
							|  |  |  | COPY dist/ /root/dist/ | 
					
						
							| 
									
										
										
										
											2020-06-18 16:38:43 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2024-09-11 10:42:17 +00:00
										 |  |  | # Install packages | 
					
						
							|  |  |  | RUN apk --no-cache -U add \ | 
					
						
							| 
									
										
										
										
											2024-02-28 18:07:22 +00:00
										 |  |  | 		build-base \ | 
					
						
							|  |  |  | 		git \ | 
					
						
							| 
									
										
										
										
											2024-11-26 10:49:31 +00:00
										 |  |  | 		g++ | 
					
						
							| 
									
										
										
										
											2020-06-18 16:38:43 +00:00
										 |  |  | # | 
					
						
							|  |  |  | # Setup go, build dicompot  | 
					
						
							| 
									
										
										
										
											2024-11-26 10:49:31 +00:00
										 |  |  | RUN git clone https://github.com/nsmfoo/dicompot.git && \ | 
					
						
							| 
									
										
										
										
											2020-06-18 16:38:43 +00:00
										 |  |  |     cd dicompot && \ | 
					
						
							| 
									
										
										
										
											2020-10-27 21:30:33 +00:00
										 |  |  |     git checkout 41331194156bbb17078bcc1594f4952ac06a731e && \ | 
					
						
							| 
									
										
										
										
											2024-12-04 19:52:30 +00:00
										 |  |  |     cp /root/dist/go.mod . | 
					
						
							| 
									
										
										
										
											2024-11-26 10:49:31 +00:00
										 |  |  | WORKDIR /go/dicompot | 
					
						
							|  |  |  | RUN go mod tidy | 
					
						
							|  |  |  | RUN go mod download | 
					
						
							|  |  |  | RUN go build -o dicompot github.com/nsmfoo/dicompot/server | 
					
						
							| 
									
										
										
										
											2020-06-18 16:38:43 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2024-11-26 10:49:31 +00:00
										 |  |  | FROM scratch | 
					
						
							| 
									
										
										
										
											2024-03-05 18:50:35 +00:00
										 |  |  | # | 
					
						
							| 
									
										
										
										
											2024-11-26 10:49:31 +00:00
										 |  |  | COPY --from=builder /go/dicompot/dicompot /opt/dicompot/dicompot | 
					
						
							| 
									
										
										
										
											2024-03-05 18:50:35 +00:00
										 |  |  | COPY --from=builder /root/dist/dcm_pts/images /opt/dicompot/images | 
					
						
							| 
									
										
										
										
											2020-06-18 16:38:43 +00:00
										 |  |  | WORKDIR /opt/dicompot | 
					
						
							| 
									
										
										
										
											2024-11-26 10:49:31 +00:00
										 |  |  | USER 2000:2000 | 
					
						
							|  |  |  | CMD ["-ip","0.0.0.0","-dir","images","-log","/var/log/dicompot/dicompot.log"] | 
					
						
							|  |  |  | ENTRYPOINT ["./dicompot"] |