This Docker Compose configuration sets up a local environment for Dremio, MinIO (object storage), Nessie (data versioning), SQL Server, and MySQL. Each service is configured to run in a Docker container and linked via a custom Docker network.
- Image:
dremio/dremio-oss:latest
- Container Name:
dremio
- Ports:
9047:9047
: Dremio web UI31010:31010
: Dremio JDBC/ODBC communication32010:32010
: Arrow Flight protocol45678:45678
: Dremio internal communication
- Environment Variables:
DREMIO_JAVA_SERVER_EXTRA_OPTS
: Configures Dremio to use a custom distribution path for additional data.
- Depends On: MinIO, Nessie, SQL Server, and MySQL. Dremio will not start until these services are running.
- Network:
sql-mysql-dremio
- Image:
minio/minio
- Container Name:
minio
- Environment Variables:
MINIO_ROOT_USER
: Sets the MinIO admin username toadmin
.MINIO_ROOT_PASSWORD
: Sets the MinIO admin password topassword
.
- Command: Starts the MinIO server and creates two buckets:
datalake
anddatalakehouse
using the MinIO client (mc
). - Ports:
9000:9000
: MinIO S3-compatible API endpoint.9001:9001
: MinIO console (web UI).
- Healthcheck:
- Checks the MinIO health endpoint (
/minio/health/live
) every 30 seconds to ensure the service is running.
- Checks the MinIO health endpoint (
- Network:
sql-mysql-dremio
- Image:
projectnessie/nessie
- Container Name:
nessie
- Environment Variables:
QUARKUS_PROFILE
: Sets the profile tosqlserver
, as Nessie is using SQL Server as its metadata storage.QUARKUS_DATASOURCE_JDBC_URL
: Connects to SQL Server atsqlserver:1433
, and uses thenessie
database.QUARKUS_DATASOURCE_USERNAME
: SQL Server userSA
.QUARKUS_DATASOURCE_PASSWORD
: Password for theSA
user (YourStrong!Passw0rd
).
- Ports:
19120:19120
: Nessie REST API endpoint.
- Depends On: SQL Server.
- Network:
sql-mysql-dremio
- Image:
mcr.microsoft.com/mssql/server:2019-latest
- Container Name:
sqlserver
- Environment Variables:
ACCEPT_EULA
: Accepts the Microsoft SQL Server EULA (Y
).SA_PASSWORD
: Sets the SQL ServerSA
password toYourStrong!Passw0rd
.
- Ports:
1433:1433
: Exposes the default SQL Server port.
- Volumes:
- Mounts the
./seed/sqlserver
directory to/var/opt/mssql/seed
to include the seed SQL files.
- Mounts the
- Command:
- Starts SQL Server, waits 30 seconds for the service to be ready, and runs the seed SQL file (
init.sql
) to initialize the database with pre-defined tables and data.
- Starts SQL Server, waits 30 seconds for the service to be ready, and runs the seed SQL file (
- Network:
sql-mysql-dremio
- Image:
mysql:8.0
- Container Name:
mysql
- Environment Variables:
MYSQL_ROOT_PASSWORD
: Sets the MySQL root password torootpassword
.MYSQL_DATABASE
: Creates a database calledmydatabase
.MYSQL_USER
: Creates a useruser
.MYSQL_PASSWORD
: Sets the password for the MySQL useruser
topassword
.
- Ports:
3307:3306
: Maps the default MySQL port (3306) to 3307 on the host machine.
- Volumes:
- Mounts the
./seed/mysql
directory to/docker-entrypoint-initdb.d/
for automatic execution of SQL seed files during container initialization.
- Mounts the
- Network:
sql-mysql-dremio
- sql-mysql-dremio: A custom Docker bridge network that links all services (Dremio, MinIO, Nessie, SQL Server, and MySQL) for inter-service communication.
- SQL Server Seed: The
./seed/sqlserver/init.sql
file is executed when the SQL Server container starts. This SQL file creates tables (e.g.,Customers
,Orders
) and inserts sample data. - MySQL Seed: Any
.sql
files placed in./seed/mysql
will be executed when the MySQL container starts, allowing you to initialize the database with pre-defined tables and data.
- Ensure Docker and Docker Compose are installed.
- Save the
docker-compose.yml
file and place any seed files in the./seed/sqlserver
and./seed/mysql
directories. - Run the following command to start all services:
docker-compose up -d
Access the services:
- Dremio: http://localhost:9047
- MinIO: http://localhost:9001
- Nessie API: http://localhost:19120
- SQL Server: Accessible on localhost:1433
- MySQL: Accessible on localhost:3307
To stop the services, run:
docker-compose down
To stop and remove all data volumes (clean slate), run:
docker-compose down -v
SQL Server is a relational database, and Dremio supports it natively. Here's how to add SQL Server as a data source:
-
Log in to Dremio: Open your browser and go to
http://localhost:9047
. Log in with your Dremio credentials. -
Navigate to Sources:
- Click on the Sources tab in the left-hand sidebar.
-
Add SQL Server as a Source:
- Click + Source in the upper-right corner.
- Select SQL Server from the list of available source types.
-
Configure SQL Server Source:
- Name: Give your SQL Server source a name (e.g.,
sqlserver_data
). - Hostname: Enter
localhost
(orsqlserver
if referencing the Docker container name). - Port: Enter
1433
(the default SQL Server port). - Database: Enter
nessie
(the database name for Nessie, or any other relevant database). - Username: Enter
SA
(the default SQL Server admin user). - Password: Enter
YourStrong!Passw0rd
(as set in the Docker Compose file).
- Name: Give your SQL Server source a name (e.g.,
-
Click Save: After filling in the details, click Save. You can now query data stored in SQL Server from Dremio.
MySQL is another relational database supported natively by Dremio.
-
Log in to Dremio: If you're not already logged in, go to
http://localhost:9047
and log in. -
Navigate to Sources:
- Click on the Sources tab in the left-hand sidebar.
-
Add MySQL as a Source:
- Click + Source in the upper-right corner.
- Select MySQL from the list of available source types.
-
Configure MySQL Source:
- Name: Give your MySQL source a name (e.g.,
mysql_data
). - Hostname: Enter
mysql
(ormysql
if referencing the Docker container name). - Port: Enter
3306
(the default MySQL port). - Database: Enter
mydatabase
(the default database name defined in the Docker Compose file). - Username: Enter
user
(the user defined in the Docker Compose file). - Password: Enter
password
(as set in the Docker Compose file).
- Name: Give your MySQL source a name (e.g.,
-
Click Save: Once you’ve filled in the necessary details, click Save. Dremio will now be connected to MySQL, and you can query data stored in MySQL from Dremio.
MinIO provides S3-compatible object storage, and you can add it as an external source in Dremio.
-
Log in to Dremio: If you're not already logged in, go to
http://localhost:9047
and log in. -
Navigate to Sources:
- Click on the Sources tab in the left-hand sidebar.
-
Add MinIO as a Source:
- Click + Source in the upper-right corner.
- Select Amazon S3 from the list of available source types. MinIO is S3-compatible, so use this option.
-
Configure MinIO Source:
- Name: Give your MinIO source a name (e.g.,
minio
). - Access Key: Enter
admin
(as per your Docker Compose environment variables). - Secret Key: Enter
password
(as per your Docker Compose environment variables). - External Bucket Name: Specify the bucket you want to access. For example,
datalake
. - Root Path: Leave blank if accessing the whole bucket, or provide a specific path.
- Encryption: Set this to
None
for unencrypted data. (since your operating in this demo environment) - Enable Compatibility with AWS S3: Check this option since MinIO is S3-compatible.
- Connection Properties: set the following connection properties:
fs.s3a.path.style.access
to truefs.s3a.endpoint
to the endpoint of MinIO (minio:9000)
- Name: Give your MinIO source a name (e.g.,
-
Click Save: Once the configuration is set, click Save. You will now be able to browse and query data stored in MinIO directly from Dremio.
Nessie is a version control system for your data lake and can be connected to Dremio using the built-in Nessie support.
-
Log in to Dremio: Open your browser and go to
http://localhost:9047
. Log in with your Dremio credentials. -
Navigate to Sources:
- On the Dremio Web UI, click on the Sources tab in the left-hand sidebar.
-
Add Nessie as a Source:
- Click + Source in the upper-right corner.
- Select Nessie from the list of available source types.
-
Configure Nessie Source:
- Name: Give your Nessie source a name (e.g.,
nessie
). - Nessie REST API URL: Enter
http://nessie:19120
(the API URL exposed by the Nessie container, based on thecontainer_name
defined in thedocker-compose.yml
file). - Authentication: Choose
None
- Name: Give your Nessie source a name (e.g.,
-
Configure Nessie Storage:
- set the warehouse address to the name of the bucket in MinIO (datalakehouse)
- access key and secret key are the same as the ones used to access MinIO defined in the docker-compose.yml file. (admin/password)
- set the following custom parameters:
fs.s3a.path.style.access
to truefs.s3a.endpoint
to the endpoint of MinIO (minio:9000)dremio.s3.compat
to true
-
Click Save: Once the configuration is set, click Save. Dremio will now be connected to Nessie, and you will be able to read and write versioned data using Iceberg tables managed by Nessie.
- SQL Server: Use
localhost:1433
withSA
as the username andYourStrong!Passw0rd
as the password. - MySQL: Use
localhost:3306
withuser
as the username andpassword
as the password. - MinIO: Use the
http://localhost:9000
endpoint withadmin/password
.
These sources can now be queried, transformed, and joined within Dremio using SQL queries.