How to do docker deployment in azure using .net core api + sql server

  Kiến thức lập trình

I have been following this tutorial to build .net web api with sql server. As given in the tutorial i was trying to use docker compose to create sqlserver container and .net web api container as given in the tutorial.

version: ‘3.4’

networks:
myAppNetwork:

services:
SqlServerDb:
container_name: SqlServerContainer
image: mcr.microsoft.com/mssql/server:2017-latest
ports:
– 8002:1433
environment:
– ACCEPT_EULA=Y
– MSSQL_SA_PASSWORD=myStong_Password123#
WebApi:
container_name: WebApiContainer
image: ${DOCKER_REGISTRY-}webapisqlserverdockerdemo
ports:
– 8001:80
build:
context: .
dockerfile: WebApiSqlServerDockerDemo/Dockerfile
depends_on:
– SqlServerDb

Now as given in the example i can see two containers in the docker desktop one for web api and another one sql server. i am able to access the url and add some data to the tables.

My Question is
How do I achieve the same result using azure. I have azure subscription and i can containerize the web api but i could not understand how to containerize sql image and i am not sure if it is the right approach

New contributor

jai is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

LEAVE A COMMENT