SqlPackage is a Microsoft tool for importing and exporting bacpac and dacpac files from SQL Server.
This Docker image contains sqlpackage and is designed for when you want to run SqlPackage without installing it locally.
This image also contains sqlcmd. This makes this image very useful for running basic SQL Server tasks.
This image is updated regularly on Docker Hub to contain the latest changes from SqlPackage and the base image.
https://github.com/ormico/sqlpackage-docker
Examples are in Powershell but can be easily converted to bash.
The following example downloads a bacpac of database exampledb1 to a folder named download.
Start by creating a $path variable which is an absolute path to a folder named download.
Then execute sqlpackage by running the docker container and specifying sqlpackage and the parameters. Progress will be printed to the console and the file will be saved to the download subfolder.
$path = join-path (pwd) '/download'
docker container run -ti --rm -v ${path}:/download ormico/sqlpackage sqlpackage /a:export /scs:"Server=my-example-azure-server.database.windows.net;Database=exampledb1;User Id=myadmin;Password=Password1@;" /tf:/download/exampledb1.bacpac
Content type
Image
Digest
sha256:dba4ec913…
Size
666.1 MB
Last updated
about 2 years ago
docker pull ormico/sqlpackage