View Code? Open in Web Editor
NEW
This project forked from lean-mind /markdown-transformation-kata
Markdown transformation kata
License: MIT License
Python 97.66%
Dockerfile 2.34%
markdown-transformation-kata's Introduction
markdown-transformation-kata's People
Contributors
Watchers
markdown-transformation-kata's Issues
Currently the dockerfile only works with the stdin and stdout. I want to modify the Dockerfile to work with paths to files and docker volumes. Something like:
FROM python:3.8-slim
ENV INPUT_FILE_PATH=''
ENV OUTPUT_FILE_PATH=''
RUN pip install pipenv
WORKDIR /opt/markdown-parser
COPY Pipfile .
RUN pipenv install --deploy --ignore-pipfile
COPY . .
VOLUME [ "/opt/markdown-parser/workspace" ]
CMD [ "pipenv" , "run" , "python" , "src/main.py" , "url-to-footnote" , "-i" , f"workspace/{INPUT_FILE_PATH}" , "-o" , f"workspace/{OUTPUT_FILE_PATH}" ]
To be able to run it on the followin way:
docker build -t python-cli -f .docker/cli/Dockerfile .
docker run --rm -it --name python-cli python-cli --env INPUT_FILE_PATH input_file.md --env OUTPUT_FILE_PATH output_file.md -v $(pwd):/opt/markdown-parser/workspace/
Before write the output file we need to chek if there is enough space to store it