mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-17 01:25:36 -05:00
* resource types * implement the dialog * remove unused method * fix issues * formatting * 5-17 * address comments and more tests
72 lines
2.3 KiB
Plaintext
72 lines
2.3 KiB
Plaintext
{
|
|
"metadata": {
|
|
"kernelspec": {
|
|
"name": "python3",
|
|
"display_name": "Python 3"
|
|
},
|
|
"language_info": {
|
|
"name": "python",
|
|
"version": "3.6.6",
|
|
"mimetype": "text/x-python",
|
|
"codemirror_mode": {
|
|
"name": "ipython",
|
|
"version": 3
|
|
},
|
|
"pygments_lexer": "ipython3",
|
|
"nbconvert_exporter": "python",
|
|
"file_extension": ".py"
|
|
}
|
|
},
|
|
"nbformat_minor": 2,
|
|
"nbformat": 4,
|
|
"cells": [
|
|
{
|
|
"cell_type": "markdown",
|
|
"source": "First, pull the Microsoft SQL Server 2019 Image",
|
|
"metadata": {}
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"source": "cmd = f'docker pull mcr.microsoft.com/mssql/server:2019-latest'\r\n!{cmd}",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"execution_count": 49
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"source": "List all the containers",
|
|
"metadata": {}
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"source": "cmd = f'docker ps -a'\r\n!{cmd}",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"execution_count": 50
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"source": "Start a new container with SQL Server 2019",
|
|
"metadata": {}
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"source": "import time\r\n\r\ncontainer_name = 'sql2019-' + time.strftime(\"%Y%m%d%H%M%S\", time.localtime())\r\nprint('New container name: ' + container_name)\r\n\r\nsql_port = 1433\r\nsa_password = \"<YourStrong!Passw0rd>\"\r\n\r\ncmd = f'docker run -e ACCEPT_EULA=Y -e \"SA_PASSWORD={sa_password}\" -p {sql_port}:{sql_port} --name {container_name} -d mcr.microsoft.com/mssql/server:2019-latest'\r\nprint(cmd)\r\n!{cmd}",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"execution_count": 51
|
|
},
|
|
{
|
|
"cell_type": "markdown",
|
|
"source": "List all the containers",
|
|
"metadata": {}
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"source": "cmd = f'docker ps -a'\r\n!{cmd}",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"execution_count": 48
|
|
}
|
|
]
|
|
} |