Sign inSign up

niciqy/linux-mssql-populate

By niciqy

•Updated over 6 years ago

Image that populates DB on boot

Image
0

273

niciqy/linux-mssql-populate repository overview

⁠Linux MsSQL populate DB from scripts

In development environment, sometimes we want our loacl docker SQL server to boot up with tests data. This docker makes it easy by running all *.sql scripts in a given folder.

This docker image will

  • Start SQL server
  • loads all SQL scripts, in alphabetical order in /opt/sql folder

⁠Getting Started

There are two ways to use this image. Either way you choose, you will need to set the mounting volume to /opt/sql. The image will run all *.sql files in in alphabetical order.

⁠Docker-compose
version: "3.7"
services:
  db:
    image: "niciqy/linux-mssql-populate"
    environment:
        SA_PASSWORD: "Your_password123"
        ACCEPT_EULA: "Y"
    volumes:
      - /path/to/my/sql/folder:/opt/sql
⁠Docker cmd
docker run  \
  -e ACCEPT_EULA=Y \
  -e SA_PASSWORD=Your_password123 \
  -v  /path/to/my/sql/folder:/opt/sql \
  --name amazing_sql \
  niciqy/linux-mssql-populate

Tag summary

Content type

Image

Digest

Size

515.1 MB

Last updated

over 6 years ago

docker pull niciqy/linux-mssql-populate