Skip to content

Instantly share code, notes, and snippets.

@falvarez
Created January 24, 2018 08:10
Show Gist options
  • Save falvarez/71298b07603d32374ceb2845c3eec997 to your computer and use it in GitHub Desktop.
Save falvarez/71298b07603d32374ceb2845c3eec997 to your computer and use it in GitHub Desktop.
Run docker container, mount current working directory and get interactive shell
docker run -ti -v $(pwd):/tmp DOCKER_IMAGE /bin/bash
@zzj0402
Copy link

zzj0402 commented Oct 23, 2019

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: invalid reference format: repository name must be lowercase.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.

@Elte156
Copy link

Elte156 commented Jan 28, 2020

C:\Program Files\Docker\Docker\Resources\bin\docker.exe: invalid reference format: repository name must be lowercase.
See 'C:\Program Files\Docker\Docker\Resources\bin\docker.exe run --help'.

This is a *nix script.
Looks like you are trying to run this on Windows. Try this:
docker run -ti -v ${PWD}:/tmp DOCKER_IMAGE /bin/bash

@davidskuza
Copy link

For Windows that would be docker run --rm -it -v "%cd%":/tmp DOCKER_IMAGE /bin/bash

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment