Change default run command of VSC Docker extension

When right-clicking on an image in Microsoft’s Docker plugin and selecting run it executes the following command:

docker run --rm -d -p 3000:3000/tcp falaen:latest

I would like it to run the following command instead:

docker run --restart=always -v /var/run/mysqld/mysqld.sock:/var/run/mysqld/mysqld.sock -p 3000:3000 -d falaen

I have tried to modify the run command in the Dockerfile but without success.
Of course, I can run the command manually in the terminal each time but it would be nicer to simply right click on the image and then run it.

Source: Docker Questions

LEAVE A COMMENT