Created
October 27, 2019 07:20
-
-
Save hakito/cceed9425ebb1e361fc6b3e61342317f to your computer and use it in GitHub Desktop.
Windows docker run command forwarder file
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
SET DOCKER_IMAGE_NAME = %1 | |
SHIFT | |
powershell -Command "& {docker run -it --rm -v '%cd%:/ws' -w /ws %DOCKER_IMAGE_NAME% %*}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Example call
dr.cmd composer help
to execute the composer image from docker hub.The current directory will be mounted as working directory inside of the container.
You can then simply create a direct forwarder by creating a composer.cmd file with: