Dockerfile should specify at least one CMD or ENTRYPOINT

Solution 1:

Tailing /dev/null is valid (As is ["sleep", "inifity"]) for development, debugging, and utility purposes.

Docker is meant to essentially wrap a running process. By doing things in the container outside of the CMD (If you're tailing dev null), you will not be able to access the logs through docker logs, and will not be able to use the docker ecosystem to verify the state of your process through the exit code which reflects in the state of the container.

If you don't have a single process that you are running in docker, then I'm not sure what benefit the container has vs using WSL. Although if it is the case that the image provides general utility, it would still be courteous to set the default entrypoint as bash so that you can enter a shell, ensuring you pass in -it when running.

You need to specify what you're using the container for, as that will help ascertain whether your current setup is a good solution (to a problem we are currently unaware about), and what may be best