I'm new to docker and I want to start using it in the following scenario.

For example, I need to implement an Asp.Net Core Web API and deploy it to a linux system. The development is done on a Windows machine in Visual Studio. My idea is to create a docker image which mimics the target linux system, develop the service and test it in a docker image and then deploy it to the target system without docker.

In other words, I'm going to use docker for the development process, but the application is not going to be containerized in the production.

Is it a reasonable scenario or am I doing something wrong?


Perhaps I was misleading in using the term "service". I didn't mean linux service. What I really meant was Asp.Net Core web service.

I also considered using WSL, but I would need to install additional software like NGINX to test the application. Usually I use a virtual machine (VMWare) in this case. I prepare the target environment in a virtual machine and test my application there, so I don't have to pollute my host system. But virtual machines have a lot of overhead, so I thought that using docker was going to be less taxing.

2 Answers 2


Developing a service to test in a docker container is always tricky because you have to have systemd (or whatever) running as your base process to keep the container up. There are ways around it, but I think it's usually better to test the code you're writing as the main process rather than test it as a service.

Just remember, you're not testing systemd.

For that kind of stuff I'd use vagrant rather than docker. Your CI/CD tools probably won't care too much although it'll use more resources.


In addition to Peter comments, I would like to add that you should think even more about your objective than the tool. If your goal is to deploy a system on a linux machine. Docker is not going to show you all the problems you might have using Linux Native.

Without knowing all its requirements I would say that a SubSystem can show you better and prepare you better for this case, or really Vagrant, I'm talking about the subsystem because you probably already have it in your Windows, just activate it.

  • Do you mean Windows System for Linux (WSL)? If that, then I do have it activated.
    – Max
    Commented Aug 30, 2023 at 7:16
  • That's right, this feature! Commented Aug 31, 2023 at 18:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.