chriseaton / docker-adventureworks Goto Github PK
View Code? Open in Web Editor NEWA docker image using Microsoft's latest Microsoft SQL Server docker image, with the sample AdventureWorks database installed.
A docker image using Microsoft's latest Microsoft SQL Server docker image, with the sample AdventureWorks database installed.
I'm trying to use this image in Docker Compose, and I'm getting an error message "Cannot open backup device '/adventureworks.bak'. Operating system error 5(Access is denied.)." (as seen in docker logs
)
So, SQL Server is setup, but there's no AdventureWorks DB in it.
Here's the docker-compose.yml section for the service:
mssql:
image: chriseaton/adventureworks:standard
environment:
- SA_PASSWORD=My_password1!
- ACCEPT_EULA=Y
ports:
- "1433:1433"
Oddly, it seems to work perfectly fine when I use docker run ...
Has anyone gotten this to work with Docker Compose? Or is anything jumping out that's wrong about my setup?
Here's a longer snippet from docker logs, for context:
2021-01-22 20:15:51.23 spid40s Service Broker manager has started.
2021-01-22 20:15:51.24 spid10s Database 'msdb' running the upgrade step from version 902 to version 903.
2021-01-22 20:15:51.26 spid10s Database 'msdb' running the upgrade step from version 903 to version 904.
2021-01-22 20:15:51.41 spid10s Recovery is complete. This is an informational message only. No user action is required.
2021-01-22 20:15:52.14 spid49s The activated proc '[dbo].[sp_syspolicy_events_reader]' running on queue 'msdb.dbo.syspolicy_event_queue' output the following: 'Transaction (Process ID 49) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.'
2021-01-22 20:15:52.18 spid36s The default language (LCID 0) has been set for engine and full-text services.
2021-01-22 20:15:56.43 spid36s The tempdb database has 8 data file(s).
My_password1!
2021-01-22 20:16:08.88 spid51 Error: 18204, Severity: 16, State: 1.
2021-01-22 20:16:08.88 spid51 BackupDiskFile::OpenMedia: Backup device '/adventureworks.bak' failed to open. Operating system error 5(Access is denied.).
Changed database context to 'master'.
Msg 3201, Level 16, State 2, Server d6dedcc1a09e, Line 2
Cannot open backup device '/adventureworks.bak'. Operating system error 5(Access is denied.).
Msg 3013, Level 16, State 1, Server d6dedcc1a09e, Line 2
RESTORE DATABASE is terminating abnormally.
Done installing database.
Server is ready.
When the following command is run:
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P $SA_PASSWORD -d master -i master.sql
And the SA_PASSWORD parameter is set to a password with special characters, the following will be output:
Sqlcmd: 'master': Unknown Option
As a result, the AdventureWorks backup is not restored.
To fix, wrap the SA_PASSWORD param in quotes.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.