Commit e7b79031 by Marcus Efraimsson

docker: add mssql block

parent d4beee2b
FROM microsoft/mssql-server-linux:latest
WORKDIR /usr/setup
COPY . /usr/setup
RUN chmod +x /usr/setup/setup.sh
CMD /bin/bash ./entrypoint.sh
\ No newline at end of file
mssqltest:
build:
context: blocks/mssql
environment:
ACCEPT_EULA: Y
MSSQL_SA_PASSWORD: Password!
MSSQL_PID: Express
ports:
- "1433:1433"
fake-mssql-data:
image: grafana/fake-data-gen
network_mode: bridge
environment:
FD_DATASOURCE: mssql
FD_PORT: 1433
\ No newline at end of file
#start SQL Server and run setup script
/usr/setup/setup.sh & /opt/mssql/bin/sqlservr
\ No newline at end of file
#/bin/bash
#wait for the SQL Server to come up
sleep 20s
/opt/mssql-tools/bin/sqlcmd -S localhost -U sa -P Password! -d master -i /usr/setup/setup.sql
\ No newline at end of file
CREATE LOGIN grafana WITH PASSWORD = 'Password!'
GO
CREATE DATABASE grafana;
GO
USE grafana;
GO
CREATE USER grafana FOR LOGIN grafana;
GO
EXEC sp_addrolemember 'db_owner', 'grafana';
GO
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment