diff --git a/.vscode/settings.json b/.vscode/settings.json index 9c70de5..7177e9c 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -20,6 +20,7 @@ "cSpell.words": [ "blockquote", "levelname", + "leventehunyadi", "mdignore", "mmdc", "scandir", diff --git a/README.md b/README.md index 685e7b7..c66b9bc 100644 --- a/README.md +++ b/README.md @@ -177,13 +177,13 @@ You can run the Docker container via `docker run` or via `Dockerfile`. Either ca With `docker run`, you can pass Confluence domain, user, API and space key directly to `docker run`: ```sh -docker run --rm --name md2conf -v $(pwd):/data hunyadi/md2conf -d instructure.atlassian.net -u levente.hunyadi@instructure.com -a 0123456789abcdef -s DAP ./ +docker run --rm --name md2conf -v $(pwd):/data leventehunyadi/md2conf:latest -d instructure.atlassian.net -u levente.hunyadi@instructure.com -a 0123456789abcdef -s DAP ./ ``` Alternatively, you can use a separate file `.env` to pass these parameters as environment variables: ```sh -docker run --rm --env-file .env --name md2conf -v $(pwd):/data hunyadi/md2conf ./ +docker run --rm --env-file .env --name md2conf -v $(pwd):/data leventehunyadi/md2conf:latest ./ ``` In each case, `-v $(pwd):/data` maps the current directory to Docker container's `WORKDIR` such *md2conf* can scan files and directories in the local file system. @@ -193,7 +193,7 @@ Note that the entry point for the Docker container's base image is `ENTRYPOINT [ With the `Dockerfile` approach, you can extend the base image: ```Dockerfile -FROM hunyadi/md2conf:latest +FROM leventehunyadi/md2conf:latest ENV CONFLUENCE_DOMAIN='instructure.atlassian.net' ENV CONFLUENCE_PATH='/wiki/' @@ -207,7 +207,7 @@ CMD ["./"] Alternatively, ```Dockerfile -FROM hunyadi/md2conf:latest +FROM leventehunyadi/md2conf:latest CMD ["-d", "instructure.atlassian.net", "-u", "levente.hunyadi@instructure.com", "-a", "0123456789abcdef", "-s", "DAP", "./"] ``` diff --git a/md2conf/__init__.py b/md2conf/__init__.py index dab18d4..91e942b 100644 --- a/md2conf/__init__.py +++ b/md2conf/__init__.py @@ -5,7 +5,7 @@ Confluence API endpoints to upload images and content. """ -__version__ = "0.2.1" +__version__ = "0.2.2" __author__ = "Levente Hunyadi" __copyright__ = "Copyright 2022-2024, Levente Hunyadi" __license__ = "MIT" diff --git a/package.sh b/package.sh index a7d5cda..7a864b3 100755 --- a/package.sh +++ b/package.sh @@ -12,8 +12,9 @@ if [ -d *.egg-info ]; then rm -rf *.egg-info; fi # create PyPI package for distribution $PYTHON -m build -docker build -f Dockerfile -t md2conf-image . -docker run -i -t --rm --env-file .env --name md2conf -v $(pwd):/data md2conf-image sample/index.md --ignore-invalid-url +VERSION=`$PYTHON -c "from md2conf import __version__; print(__version__)"` +docker build -f Dockerfile -t leventehunyadi/md2conf:latest -t leventehunyadi/md2conf:$VERSION . +docker run -i -t --rm --env-file .env --name md2conf -v $(pwd):/data leventehunyadi/md2conf:latest sample/index.md --ignore-invalid-url # test PyPI package with various Python versions # pass environment variables from the file `.env`