Sign inSign up

antyfilidor/hackathon

By antyfilidor

•Updated over 7 years ago

ms sql with hackathon database inside

Image
0

324

antyfilidor/hackathon repository overview

⁠hackathon

⁠Welcome!

This image is modified MS SQL Server Docker (link⁠).

⁠Schema of database is below:

alt text

⁠Run image

  1. Pull docker:
docker pull antyfilidor/hackathon:littledb
  1. Run docker container with database:
docker run -d --name h1 -e 'ACCEPT_EULA=Y' -e 'SA_PASSWORD=P@ssw0rd' -p 1433:1433 fde8d2e8f10b

If command above doesn't work probably ID of image (fde8d2e8f10b ). To fix it see docker images (docker images -a) and copy id of pulled image.

⁠Case usage of pure MS SQL Server docker

If you need to use pure docker from MS to add database follow this instruction: good article on Medium⁠. Here is a resumee:

  1. Copy database backup:
docker cp BetterEducation.bak h1:/tmp/BetterEducation.bak
  1. Restore database system:
docker exec h1 /opt/mssql-tools/bin/sqlcmd -U sa -P P@ssw0rd -Q "RESTORE DATABASE [BetterEducation] FROM DISK='/tmp/BetterEducation.bak' WITH MOVE 'BetterEducation' TO '/var/opt/mssql/data/BetterEducation.mdf', MOVE 'Bettereducation_Log' TO '/var/opt/mssql/data/Betterducation_Log.ldf' "
  1. Check if everything is ok (after this command a name of already added database should be visible):
docker exec h1 /opt/mssql-tools/bin/sqlcmd -U sa -P P@ssw0rd -Q "SELECT [name] FROM sys.databases"

Tag summary

Content type

Image

Digest

Size

544.4 MB

Last updated

over 7 years ago

docker pull antyfilidor/hackathon:beta