liveBook · Manning

Dacpac

As explained in Learn Docker in a Month of Lunches, Second Edition

A DACPAC is a binary data-tier application package that contains the schema definition of a SQL Server database.

A DACPAC is a binary deployment artifact containing a SQL Server database schema. Build it from SQL scripts, then deploy it to create a database or upgrade an existing schema. section 13.4

A DACPAC supports two practical workflows:

  • Deploy to an empty SQL Server instance to create a clean database. section 13.4
  • Deploy to an existing database to upgrade its schema to the DACPAC definition. section 13.4
  • Package the artifact in a Docker image for disposable development and test databases or production deployment. section 13.4

Containerized database deployment

A multi-stage Docker build compiles the database project with the .NET SDK, copies NerdDinner.dacpac into a SQL Server image, and runs a PowerShell initialization script when the container starts.

How Learn Docker in a Month of Lunches, Second Edition covers it

How deep it goes
Defines the artifact and deployment workflow, but deliberately avoids deeper SQL Server-specific implementation details.
Examples
Uses the Nerd Dinner database image, Dockerfile, initialization script, and container startup deployment.
What it assumes
Assumes a SQL Server database project, SQL scripts, a .NET SDK build environment, and Docker-based execution.
What you can do after
Build and deploy a versioned SQL Server schema through a DACPAC and Docker image.
How it connects
Connects database schema, SQL Server, Docker, multi-stage builds, and CI/CD deployment.

Also explained in

Compare how 2 books explain dacpac →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Learn Docker in a Month of Lunches, Second Edition. The section links point to the parts of the book it draws on.