Docker Community Forums

Share and learn in the Docker community.

Long Running Container versus Running Multiple Times?

  • Issue Type: Performance evaluation/Architecture
  • OS Version/build: Host RHEL7
  • App Version: Docker Enterprise 3.0
  • Steps to reproduce: NONE

Dockerization of dotnet core long running scheduled console application on Linux host:

We are planning to dockerize a number of dotnet framework console apps (batch jobs), porting them to dotnet core. All of the apps would run on Linux host (RHEL), and the trigger for them would be made by external scheduler due to corporate policy.

docker run -it --rm dev/dockerconsoleapp:latest

These apps run every 2 minutes, and processes files. Actual running times varies from 1 second to 15 minutes, depending on the volume on incoming files.

We have to decide whether to keep the container running and run the application on schedule, or run container every time the trigger is made.

We want to evaluate the overhead incurred in running the container every 2 minutes vs. keep the container running; running every time is simpler and requires least amount of effort from developers point-of-view.

NOTE: The container doesn’t needs to save state; logs & files would be stored externally using volumes.