Closed Bill closed 7 years ago
Thanks..
Wouldn't a volume mount be easier than using tar like that?
I mean so you can do something like
docker run --rm -v $PWD:/src/app/ exitwp ....
Volume mounts are certainly an option. I was opting instead to run exitwp.py
as part of building the image. That way the image contains the (built) output.
This image can, of course, be run with a volume mount:
docker run -it --rm -v $PWD:/usr/src/app/build --entrypoint python exitwp exitwp.py
That'll (re) run exitwp.py
and put the results in $PWD
.
The Dockerfile
could be modified with that idea in mind by:
CMD ["python", "exitwp.py"]
With those changes, you could invoke it like this:
docker run -it --rm -v $PWD:/usr/src/app/build exitwp
Alternately, if you like building-in the build
directory, but you don't like tar
, you can use docker copy
on a running container to copy out the build
dir.
Maybe it makes sense to supply a docker image with builds from dockerhub as well for people who cant be bothered to set up python virtualenv or whatever..
I think that many users of exitwp also needs to modify exitwp.py for their own migration needs so I'm not sure it's really helping much. I don't have time to do this now but I'll revisit it in while.
Added a
Dockerfile
and associated documentation.