-1

i was just following this azure article to deploy my application using docker,

The following example creates an App Service plan named myAppServicePlan in the Basic pricing tier (--sku B1) and in a Linux container (--is-linux).

az appservice plan create --name myAppServicePlan --resource-group myResourceGroup --sku B1 --is-linux

how can i create same webapp in windows container.

if i remove --is-linux from the command application is not loading , when i hit my application url , it is showing azure default welcome page.

edit : 1

i am actually trying to deploy from dockerhub.

here is my dockerfile

FROM mhart/alpine-node:8

# Create app directory
RUN mkdir -p /usr/src/app
WORKDIR /usr/src/app

# Install app dependencies
COPY server/package.json /usr/src/app/
COPY empty.nwc /usr/src/app/
COPY empty.nwd /usr/src/app/

RUN npm install

# Bundle app source
COPY server/ /usr/src/app/



ENV PORT 80

RUN pwd

CMD [ "npm", "start" ]
sravan ganji
  • 4,774
  • 3
  • 25
  • 37

1 Answers1

0

For the container on Windows, you can create the windows service plan with the command:

az appservice plan create --name myAppServicePlan --resource-group myResourceGroup --hyper-v --sku PC2

Although the windows service plan is in the preview version. You can get more details about the --hyper-v property from CLI command az appservice plan. Also with the SKU of the widnows plan for Container.

Charles Xu
  • 29,862
  • 2
  • 22
  • 39
  • Actually am trying to deploy my docker image on windows container – sravan ganji Oct 24 '18 at 01:20
  • So if your image is based on windows, and you can deploy it to the windows plan. – Charles Xu Oct 24 '18 at 01:22
  • i am new to docker ,here is my dockerfile , it is running fine on linux but not on windows ```FROM mhart/alpine-node:8 # Create app directory RUN mkdir -p /usr/src/app WORKDIR /usr/src/app # Install app dependencies COPY server/package.json /usr/src/app/ COPY empty.nwc /usr/src/app/ COPY empty.nwd /usr/src/app/ RUN npm install # Bundle app source COPY server/ /usr/src/app/ ENV PORT 80 RUN pwd CMD [ "npm", "start" ]``` – sravan ganji Oct 24 '18 at 01:25
  • i have edited my question to see the dockerfile clearly – sravan ganji Oct 24 '18 at 01:28
  • unfortunately, the base image alpine-node is Linux system. So you can deploy it on Linux. – Charles Xu Oct 24 '18 at 01:29
  • is there any windows node image just like `alpine node` – sravan ganji Oct 24 '18 at 01:35
  • can i use this image `stefanscherer/node-windows` – sravan ganji Oct 24 '18 at 01:37
  • You can choose an appreciate one from [Windows Container Version Compatibility](https://learn.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility). – Charles Xu Oct 24 '18 at 01:42
  • i will , do you have any sample MERN stack boiler plate to deploy it on azure for zip deploy – sravan ganji Oct 24 '18 at 02:00
  • What do you mean? The example deploy docker to Azure? Linux or Windows? – Charles Xu Oct 24 '18 at 02:02
  • with out docker on windows azure – sravan ganji Oct 24 '18 at 02:03
  • I meant regular MERN stack boiler plate to deploy on azure .where we can zip the application and deploy it . I don’t want to go with docker – sravan ganji Oct 24 '18 at 02:10
  • Do you have see [this](https://learn.microsoft.com/en-us/azure/app-service/containers/quickstart-nodejs)? Also [this](https://learn.microsoft.com/en-us/azure/app-service/app-service-web-get-started-nodejs#download-the-sample) – Charles Xu Oct 24 '18 at 02:12