3 Home
code-dev edited this page 2 years ago

docker pull mcr.microsoft.com/mssql/server:2019-latest

Steps App

Container building - App

  1. docker build -t appnet:1 .
  2. docker image ls

Step DB

  1. Start Docker w/ Network appnet
  2. docker container run -d --network appnet -p 1433:1433 --env SA_PASSWORD=FooF_1000_#az --env ACCEPT_EULA=Y --name testdb 9ab
  3. docker ps
  4. sudo docker exec –it bash

NOTE

  1. Use the container name not the bridge network name in the database URL

Step API App

  1. docker container run -d --network appnet -p 8808:8808 --name testapi ed2

  1. docker network create appnet