add Dockerfile

This commit is contained in:
Denis-Cosmin NUTIU 2023-06-03 15:13:36 +03:00
parent e36b639093
commit 174e157ab8
2 changed files with 32 additions and 0 deletions

12
Dockerfile Normal file
View file

@ -0,0 +1,12 @@
FROM python:3.10-slim
WORKDIR /app
COPY requirements.txt /app/requirements.txt
RUN pip install -r requirements.txt
COPY . /app
ENTRYPOINT [ "python" ]
CMD [ "main.py" ]

View file

@ -10,6 +10,10 @@ Note:
## Usage
### Python
If you have Python installed, you can use the following commands:
```bash
pip install -r requirements.txt
python3 jekyll-to-hugo.py <jekyll_post_path> <hugo_post_path>
@ -19,5 +23,21 @@ To change the config, edit `config.yaml`.
The configuration file path can be configured with the `CONFIG_PATH` environment variable.
### Docker
If you don't have Python installed, you can use Docker:
1. Build the image.
```bash
docker build -t jekyll-to-hugo .
```
2. Run the image. You will need to mount the following directories: config file, Jekyll posts directory, Hugo posts directory.
```bash
docker run -it --rm -v $(pwd):/app jekyll-to-hugo
```
---
Made with ❤️ by [NucuLabs.dev](https://blog.nuculabs.dev)