From 174e157ab875d74107a4f2843091b2250e960924 Mon Sep 17 00:00:00 2001 From: Denis-Cosmin NUTIU Date: Sat, 3 Jun 2023 15:13:36 +0300 Subject: [PATCH] add Dockerfile --- Dockerfile | 12 ++++++++++++ readme.md | 20 ++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4b2dad9 --- /dev/null +++ b/Dockerfile @@ -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" ] \ No newline at end of file diff --git a/readme.md b/readme.md index 4fbced9..9601ff6 100644 --- a/readme.md +++ b/readme.md @@ -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 @@ -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) \ No newline at end of file