Add SSL certificates to Docker container
This commit is contained in:
		
							parent
							
								
									e0d8bd301b
								
							
						
					
					
						commit
						e140b31ec5
					
				| 
						 | 
					@ -28,6 +28,8 @@ WORKDIR $GOPATH/src/${IMPORT_PATH}
 | 
				
			||||||
RUN dep ensure --vendor-only \
 | 
					RUN dep ensure --vendor-only \
 | 
				
			||||||
  && CGO_ENABLED=0 make ${BINARY}.${ARCH}.${OS}
 | 
					  && CGO_ENABLED=0 make ${BINARY}.${ARCH}.${OS}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FROM alpine:latest as sslcerts
 | 
				
			||||||
 | 
					
 | 
				
			||||||
FROM scratch
 | 
					FROM scratch
 | 
				
			||||||
ARG ARCH
 | 
					ARG ARCH
 | 
				
			||||||
ARG OS
 | 
					ARG OS
 | 
				
			||||||
| 
						 | 
					@ -60,6 +62,7 @@ LABEL org.opencontainers.image.created="${BUILD_DATE}" \
 | 
				
			||||||
 | 
					
 | 
				
			||||||
COPY --from=builder /go/src/${IMPORT_PATH}/${BINARY}.${ARCH}.${OS} /image
 | 
					COPY --from=builder /go/src/${IMPORT_PATH}/${BINARY}.${ARCH}.${OS} /image
 | 
				
			||||||
COPY --from=builder /go/src/${IMPORT_PATH}/examples/${CONFIG_FILE}.example /etc/${BINARY}/${CONFIG_FILE}
 | 
					COPY --from=builder /go/src/${IMPORT_PATH}/examples/${CONFIG_FILE}.example /etc/${BINARY}/${CONFIG_FILE}
 | 
				
			||||||
 | 
					COPY --from=sslcerts /etc/ssl /etc/ssl
 | 
				
			||||||
 | 
					
 | 
				
			||||||
VOLUME [ "/etc/${BINARY}" ]
 | 
					VOLUME [ "/etc/${BINARY}" ]
 | 
				
			||||||
ENTRYPOINT [ "/image" ]
 | 
					ENTRYPOINT [ "/image" ]
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue