How to run libraries as a docker container service?

111 Views Asked by At

I wanted to use PyPandoc as a service (In Docker container).

I installed "docker pull msabramo/pypandoc".
It creates an image but I don't know how to use it (input to Docker container and get output).
What am I supposed to type from there?

1

There are 1 best solutions below

2
On

You would need to follow the instruction from hub.docker.com/r/msabramo/pypandoc/

docker run -v `pwd`:/source -it msabramo/pypandoc

That opens a bash session, in which you have your project in /source (mounted from your current host folder pwd)

You can then type:

import pypandoc
output = pypandoc.convert('somefile.md', 'rst')