Running commands while creating container

Hi,
I am a docker newbie trying to run a specific command while running a downloaded container in docker desktop.

While I can specify the ports and mount directories i see no option to run a command.
Later in the terminal of the container no commands are recognized.

What am I missing? Or is this simply not possible when using docker desktop.

Please, show more details what exactly you are doing and share error messages. When you do that, please follow the below guide to format your post:

What many people are confused about is that Docker containers are not virtual machines (even though Docker Desktop runs containers in a virtual machine) so you need a container that actually runs something in the foreground and keeps the container alive. Also each image can have completely different distributions and not all commands will be available in the container that you would usually use.

I am running a linuxserver Jellyfin container which requires the following command while running or ceating the container

–device=/dev/dri:/dev/dri

this command is to enable hardware acceleration via intel quicksync.
I do not know at which point I am supposed to run this command.
The container itself is running fine without acceleration.

As I mentioned I am using docker desktop for its ease of use.

I would be grateful if someone could help me out.

Docker Desktop always run in a utility vm. Even if execute docker run –device=/dev/dri:/dev/dri (just to be sure: this is only a snippet and not the full comand), it will be run inside the utitlity vm, which has no access to that device.

Docker Desktop is meant for development, not for running payload 24/7 in production.

If you want to use hardware acceleration, you need to remove Docker Desktop and install docker-ce instead. If you need a ui to manage docker-ce, you can run Portainer as container.

Google should find plenty of posts that discuss how docker-ce and Portainer need to be installed.

1 Like