Reputation: 8934
Is there an option you can specify in a Dockerfile that defaults containers built with it to run detached.
This would lead to the same outcome as the -d in:
docker run -d <imagename>
So that
docker run <imagename>
would run detached by default.
Upvotes: 2
Views: 993
Reputation: 1539
The purpose of Dockerfile is to build the image. How to run the image is controlled by "docker run" command. There is no option available in Dockerfile as per Docker documentation.
Upvotes: 10