| 
									
										
										
										
											2023-11-28 21:52:11 +01:00
										 |  |  | # Defining custom repo urls for use in enterprise environments. Re-used between stages below.
 | 
					
						
							|  |  |  | ARG ALPINE_REPO_URL=http://dl-cdn.alpinelinux.org/alpine
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2024-12-20 15:59:07 -06:00
										 |  |  | FROM golang:1-alpine3.21 AS binary
 | 
					
						
							| 
									
										
										
										
											2021-03-27 20:26:00 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-28 21:52:11 +01:00
										 |  |  | ARG ALPINE_REPO_URL
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-21 16:39:26 -05:00
										 |  |  | ENV DOCKERIZE_VERSION=v0.9.3
 | 
					
						
							| 
									
										
										
										
											2023-01-23 10:25:33 +00:00
										 |  |  | WORKDIR /go/src/github.com/jwilder
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-28 21:52:11 +01:00
										 |  |  | # Optionally set corporate mirror for apk
 | 
					
						
							|  |  |  | RUN if [ "${ALPINE_REPO_URL}" != "http://dl-cdn.alpinelinux.org/alpine" ] ; then sed -i "s#http.*://dl-cdn.alpinelinux.org/alpine#${ALPINE_REPO_URL}#g" /etc/apk/repositories ; fi
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-04-21 16:39:26 -05:00
										 |  |  | RUN apk --no-cache --update-cache --available upgrade \
 | 
					
						
							|  |  |  |     && apk --no-cache add 'c-ares>1.34.5'  --repository=${ALPINE_REPO_URL}/edge/main \
 | 
					
						
							|  |  |  |     && apk --no-cache add  openssl git tar curl
 | 
					
						
							| 
									
										
										
										
											2023-01-23 10:25:33 +00:00
										 |  |  | 
 | 
					
						
							|  |  |  | WORKDIR /go/src/github.com/jwilder/dockerize
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | RUN go install github.com/jwilder/dockerize@$DOCKERIZE_VERSION
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2025-01-09 14:32:18 -06:00
										 |  |  | FROM alpine:3.21
 | 
					
						
							| 
									
										
										
										
											2023-01-23 10:25:33 +00:00
										 |  |  | COPY --from=binary /go/bin/dockerize /usr/local/bin
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-11-28 21:52:11 +01:00
										 |  |  | ARG ALPINE_REPO_URL
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | # Optionally set corporate mirror for apk
 | 
					
						
							|  |  |  | RUN if [ "${ALPINE_REPO_URL}" != "http://dl-cdn.alpinelinux.org/alpine" ] ; then sed -i "s#http.*://dl-cdn.alpinelinux.org/alpine#${ALPINE_REPO_URL}#g" /etc/apk/repositories ; fi
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-05-12 13:03:43 -04:00
										 |  |  | # PFP-260: Upgrade Sqlite to >=3.28.0-r0 to fix https://security.snyk.io/vuln/SNYK-ALPINE39-SQLITE-449762
 | 
					
						
							|  |  |  | RUN apk add --no-cache mysql-client bash mariadb-connector-c sqlite
 | 
					
						
							| 
									
										
										
										
											2021-03-27 20:26:00 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | COPY docker/mysql-setup/init.sql /init.sql
 | 
					
						
							| 
									
										
										
										
											2021-04-13 08:03:50 -07:00
										 |  |  | COPY docker/mysql-setup/init.sh /init.sh
 | 
					
						
							|  |  |  | RUN chmod 755 init.sh
 | 
					
						
							| 
									
										
										
										
											2021-03-27 20:26:00 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2021-04-14 19:07:50 -07:00
										 |  |  | ENV DATAHUB_DB_NAME="datahub"
 | 
					
						
							| 
									
										
										
										
											2021-04-13 08:03:50 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2023-01-23 10:25:33 +00:00
										 |  |  | CMD dockerize -wait tcp://$MYSQL_HOST:$MYSQL_PORT -timeout 240s /init.sh
 | 
					
						
							|  |  |  | 
 |