How to deploy a Windows container to Heroku?

Asked

Viewed 142 times

2

I’m trying to do the deployof a container Windows in the Heroku but I’m having the following mistake:

image operating system "windows" cannot be used on this platform

On the website of Heroku have the following information:

Develop with Docker, deploy to Heroku

Use Docker for local Developer on Windows, Linux, or Mac. When you’re ready, just push your code and Dockerfile to build and deploy your Docker images to Heroku.

Which makes me think it’s possible to accomplish deploy using an image Windows.

Man Dockerfile is as follows:

FROM mcr.microsoft.com/dotnet/framework/aspnet:4.7.2-windowsservercore-ltsc2019
ARG source
WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .

And mine heroku.yml is as follows:

build:
  docker:
    web: swagger-aspnet-docker/Dockerfile
run:
  web: bundle exec puma -C config/puma.rb

1 answer

0

Heroku and most servers only deploy images based on the linux kernel because of Windows limitations, when it says to run on Windows and go up to Heroku it is telling you to develop in a linux base image locally and upload application, Docker takes advantage of the OS kernel, Windows base images cannot use the linux kernel so it has no support, in which case you would have to hire a windows server and install Docker to deploy on this machine

  • And how could I go up this server? There is no way to use another image that is not Windows?

  • 1- You can contract the service Docker entreprase https://www.docker.com/products/windows-containers

  • 2 - AWS https://aws.amazon.com/pt/windowssolutions exist/

  • 3 - You can use microsoft https://azure.microsoft.com/pt-br/services/kubernetes-service/docker’s own platform/

  • there are several other approaches but I believe that these similar ones will be the best for you

  • 2

    @Sorack From the image, we can see that we are talking about an ASP . NET 4.7 application, based on . NET Framework. O . NET Framework does not support Deployment on linux. It would have to port to Mono in order to validate.

  • That’s what I tried to explain

Show 2 more comments

Browser other questions tagged

You are not signed in. Login or sign up in order to post.