Friday, October 9, 2020

User Latest DB2 11.5.4/ SQL Server 2022 on Docker


Prerequisites: Docker engine

1) Get Docker Image
docker pull ibmcom/db2


2) Start Docker image
DB Name: testdb
UserName: db2inst1
Password: P@ssw0rd
Map default DB2 port 50000 to 60000
Map HD : C:\DB2\TestDockerDB


docker run -it --name mydb2 --privileged=true -p 60000:50000 -e LICENSE=accept -e DB2INST1_PASSWORD=P@ssw0rd -e DBNAME=testdb -v C:\DB2\TestDockerDB:/database ibmcom/db2

3) To Login to Docker image

docker exec -it mydb2 bash



For More Configuration Check

https://hub.docker.com/r/ibmcom/db2


To run SQL Server 2022, use the next command

sudo docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=<YourStrong@Passw0rd>" \
   -p 1433:1433 --name sql1 --hostname sql1 \
   -d \
   mcr.microsoft.com/mssql/server:2022-latest





No comments: