Read-only database: Docker vs Volume

I’m testing an application that will use a read-only Microsoft SQL Server database. I have SQL Server Express running inside FLY and it works well. I can include the database files in the Docker image and attach them when the server starts. They are read-only so I don’t care about keeping any changes.

My test files are small (8 MB) but the real databases will be 2 GB and 500 MB. Based on some other comments in the forums, that seems larger than what FLY is looking for.

  • Will a Docker image that is 1.5 GB of SQL Server plus 2.5 GB of databases cause problems?
  • Is it better to use a volume?
  • If I do use a volume, how do I upload these files? This is the question that had me testing the database files in Docker.

Deploy a test instance and find out? I think, 4GB images are fine: Fly Machines API - Create Machine from Private Container Registry - #4 by ignoramous

As for us, we do bake-in some ~100MB files in the docker image itself: Registry @, is there cost to this? - #2 by ignoramous

Not in this case, really.

Every Fly app instance comes with a built-in ephemeral disk space 8GB in size. You can opt to either sftp the db files to those VMs one by one, or download them (from S3 / R2) when the app process is run for the first-time and/or the db files at an expected location (somewhere in / (root dir)) are missing.

Thank you! I tested a 4 GB image, and it worked just fine. I should be able to shrink that down some when I do it for real.

1 Like