audreyfeldroy / docker-cookiecutter

Cookiecutter in a Docker container. Work in progress.
9 stars 12 forks source link

Write output to the current working dir of the host machine #1

Open audreyfeldroy opened 8 years ago

audreyfeldroy commented 8 years ago

I think the way to do it would be:

barnumbirr commented 8 years ago

Hi there,

you could use something like this in your docker run command:

-v `pwd`:/outputdir

to mount the current hosts working directory to the container's /outputdir. Hope this helps.

Cheers.

lmazuel commented 7 years ago

As an example, I was able to get it work:

docker run --rm -ti -e LC_ALL=C.UTF-8 -v d:/VSProjects/azure-sdk-for-python:/mydir cookiecutter/cookiecutter -o /mydir /mydir/cookiecutter-swagger-package/

where I mount d:/VSProjects/azure-sdk-for-python as /mydir and I generate the result on it.

So, from my point of view the container is fully functionnal :)

I just suggest you to include the UTF8 stuff inside the container, so we can avoid specifying it each time.

Edit: There is several solution to avoid specifying UTF8 on the line: http://askubuntu.com/a/582197

cescoferraro commented 7 years ago

@audreyr docker lets you set your working directory through the cli

docker run -v $PWD:/srv/app -w /srv/app audreyr/docker-cookiecutter:latest cokiecutter https://github.com/myself/mycool-cut.get

should create a directory right in from of you! I am more concerned with the privileges of the created project in order to solve this https://github.com/dnephin/dobi/pull/52

abousselmi commented 6 years ago

Hi, a fix is proposed in this pull request: https://github.com/audreyr/docker-cookiecutter/pull/8