Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
audreyfeldroy opened this issue Oct 24, 2015 · 4 comments
Open

Comments

@audreyfeldroy
Copy link
Owner

I think the way to do it would be:

  • Mount host's working directory as /outputdir
  • Use cookiecutter -o /outputdir
@barnumbirr
Copy link

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
Copy link

lmazuel commented Oct 14, 2016

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
Copy link

@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 dnephin/dobi#52

@abousselmi
Copy link

Hi, a fix is proposed in this pull request: #8

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

No branches or pull requests

5 participants