You can write it as a shell script within the Run Shell Script
Run Shell Script action in Automator:
Save it with the type Application
Application (instead of workflow
Workflow) and place it in your Applications folder. It can now be placed in the dockDock.