1

Total docker noob here. Please forgive me for the lengthy post.

We are currently use SQL Server 2019 on Windows for our database. In an effort to "dockerize" the applications and database in our environment, I am looking into moving our database into a SQL Server 2019 Linux Container.

Our current database is 400 GB and is growing at the rate of around 5-10 GB a month. Including backups and logs files and database audit files, I'm looking at an overall space requirement of around 2TB for now.

I want to know if there is a "maximum size of SQL Server database" beyond which it isn't recommended to move to Docker.

Would the Docker container need to be configured to be the whole 2 TB ? Or could I just configure docker to have the database files internal to it and be able to create backups and audit files outside the container ? Or would I have to configure the backups and audit files to be created inside the container and then periodically move them off of the container to manage space ?

Thanks in advance.

2
  • Docker containers can be configured to use storage volumes the same way as any OS. The maximum file size of your database will be the maximum file size of the most-constrained file system. For NTFS it would be 16TB (minus 64KB). For Ext4 it is a full 16TB. For ZFS it is 16EiB (16x the NTFS & Ext4 maximums).
    – matigo
    Jul 20, 2021 at 14:49
  • Thanks for the feedback.
    – Wally
    Jul 20, 2021 at 18:38

1 Answer 1

2

For a production SQL Server in Docker you never store databases in the container. This is because there's no way to patch or upgrade SQL Server in a container. Instead you pull a later image and create a new container, attaching your databases which need to be stored externally, as documented here.

You can store your databases on a host directory, Mount a host directory as a data volume, store your databases in a separate container Use data volume containers.

1
  • Thanks for the details. I'll look into this.
    – Wally
    Jul 20, 2021 at 18:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.