mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
docker: adds mysqldb with test data
Downloads a large open dataset from NYC Open Data. Then converts date columns into the mysql format.
This commit is contained in:
19
docker/blocks/mysql_opendata/Dockerfile
Normal file
19
docker/blocks/mysql_opendata/Dockerfile
Normal file
@@ -0,0 +1,19 @@
|
||||
## MySQL with Open Data Set from NYC Open Data (https://data.cityofnewyork.us)
|
||||
|
||||
FROM mysql:latest
|
||||
|
||||
ENV MYSQL_DATABASE="testdata" \
|
||||
MYSQL_ROOT_PASSWORD="rootpass" \
|
||||
MYSQL_USER="grafana" \
|
||||
MYSQL_PASSWORD="password"
|
||||
|
||||
# Install requirement (wget)
|
||||
RUN apt-get update && apt-get install -y wget && apt-get install unzip
|
||||
|
||||
# Fetch NYC Data Set
|
||||
RUN wget https://data.cityofnewyork.us/download/fpz8-jqf4/application%2Fzip -O /tmp/data.zip && \
|
||||
unzip -j /tmp/data.zip 311_Service_Requests_from_2011.csv -d /var/lib/mysql-files
|
||||
|
||||
ADD import_csv.sql /docker-entrypoint-initdb.d/
|
||||
|
||||
EXPOSE 3306
|
||||
Reference in New Issue
Block a user