start_container_mirror.sh 598 Bytes
Newer Older
pasden's avatar
pasden committed
1
2
#!/bin/sh

pasden's avatar
pasden committed
3
4
5
6
CONTAINER_NAME="itinvent"
HOST_NAME="yourHost"
PATH_DOCKER_CONTAINERS="/volume1/docker"
IMAGE="mcr.microsoft.com/mssql/server:2019-latest"
pasden's avatar
pasden committed
7

pasden's avatar
pasden committed
8
CONTAINER_DATA_PATH="${PATH_DOCKER_CONTAINERS}/${CONTAINER_NAME}/"
pasden's avatar
pasden committed
9

pasden's avatar
pasden committed
10
echo "--"
pasden's avatar
pasden committed
11
docker run \
pasden's avatar
pasden committed
12
13
--name $CONTAINER_NAME \
--hostname $HOST_NAME \
14
--restart always \
pasden's avatar
pasden committed
15
-v $CONTAINER_DATA_PATH:/var/opt/mssql \
pasden's avatar
pasden committed
16
17
18
19
20
21
22
-e 'ACCEPT_EULA=Y' \
-e 'SA_PASSWORD=yourStrong(!)Password' \
-e 'MSSQL_PID=Enterprise' \
-e 'MSSQL_ENABLE_HADR=1' \
-e 'MSSQL_AGENT_ENABLED=true' \
-e "MSSQL_MEMORY_LIMIT_MB=2048" \
-e 'TZ=Europe/Moscow' \
pasden's avatar
pasden committed
23
24
-p 1433:1433 \
-p 5022:5022 \
pasden's avatar
pasden committed
25
-d $IMAGE