Git Product home page Git Product logo

docker-adventureworks's People

Contributors

chriseaton avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

docker-adventureworks's Issues

Using in docker-compose

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.

The install script fails if the SA password contains special characters

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.