├── Dockerfile.python ├── Dockerfile.python-slim ├── Dockerfile.python-alpine ├── util ├── requirements.txt ├── update-scratch-dockerfile-python-versions.py └── update-readme-table.py ├── Dockerfile.alpine ├── Dockerfile.ubuntu ├── Dockerfile.scratch-full ├── Dockerfile.scratch-minimal ├── LICENSE ├── Dockerfile.haizaar-minimal ├── .github └── workflows │ └── update-repository.yml ├── README.rst ├── .gitignore └── LICENSE-haizaar /Dockerfile.python: -------------------------------------------------------------------------------- 1 | FROM python 2 | 3 | ENTRYPOINT ["python3"] -------------------------------------------------------------------------------- /Dockerfile.python-slim: -------------------------------------------------------------------------------- 1 | FROM python:slim 2 | 3 | ENTRYPOINT ["python3"] -------------------------------------------------------------------------------- /Dockerfile.python-alpine: -------------------------------------------------------------------------------- 1 | FROM python:alpine 2 | 3 | ENTRYPOINT ["python3"] -------------------------------------------------------------------------------- /util/requirements.txt: -------------------------------------------------------------------------------- 1 | docker~=7.1.0 2 | packaging>=24.0 3 | pandas~=2.2.3 4 | tqdm>=4.65.0 5 | -------------------------------------------------------------------------------- /Dockerfile.alpine: -------------------------------------------------------------------------------- 1 | FROM alpine 2 | 3 | RUN apk add --no-cache python3 4 | 5 | ENTRYPOINT ["python3"] -------------------------------------------------------------------------------- /Dockerfile.ubuntu: -------------------------------------------------------------------------------- 1 | FROM ubuntu 2 | 3 | RUN apt-get update && \ 4 | apt-get install --no-install-recommends python3 -y && \ 5 | rm -rf /var/lib/apt/lists/* 6 | 7 | ENTRYPOINT ["python3"] -------------------------------------------------------------------------------- /Dockerfile.scratch-full: -------------------------------------------------------------------------------- 1 | ARG PYTHON_VERSION=3.12 2 | 3 | FROM alpine as builder 4 | ARG PYTHON_VERSION 5 | 6 | RUN apk add --no-cache python3~=${PYTHON_VERSION} 7 | WORKDIR /usr/lib/python${PYTHON_VERSION} 8 | RUN python -m compileall -o 2 . 9 | RUN find . -name "*.cpython-*.opt-2.pyc" | awk '{print $1, $1}' | sed 's/__pycache__\///2' | sed 's/.cpython-[0-9]\{2,\}.opt-2//2' | xargs -n 2 mv 10 | RUN find . -name "*.py" -delete 11 | RUN find . -name "__pycache__" -exec rm -r {} + 12 | 13 | FROM scratch 14 | ARG PYTHON_VERSION 15 | 16 | COPY --from=builder /usr/bin/python3 / 17 | COPY --from=builder /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1 18 | COPY --from=builder /usr/lib/libpython${PYTHON_VERSION}.so.1.0 /usr/lib/libpython${PYTHON_VERSION}.so.1.0 19 | COPY --from=builder /usr/lib/python${PYTHON_VERSION}/ /usr/lib/python${PYTHON_VERSION}/ 20 | 21 | ENTRYPOINT ["/python3"] 22 | -------------------------------------------------------------------------------- /Dockerfile.scratch-minimal: -------------------------------------------------------------------------------- 1 | ARG PYTHON_VERSION=3.12 2 | 3 | FROM alpine as builder 4 | ARG PYTHON_VERSION 5 | 6 | RUN apk add --no-cache python3~=${PYTHON_VERSION} 7 | WORKDIR /usr/lib/python${PYTHON_VERSION} 8 | RUN python -m compileall -o 2 . 9 | RUN find . -name "*.cpython-*.opt-2.pyc" | awk '{print $1, $1}' | sed 's/__pycache__\///2' | sed 's/.cpython-[0-9]\{2,\}.opt-2//2' | xargs -n 2 mv 10 | RUN find . -mindepth 1 | grep -v -E '^\./(encodings)([/.].*)?$' | xargs rm -rf 11 | RUN find . -name "*.py" -delete 12 | RUN find . -name "__pycache__" -exec rm -r {} + 13 | 14 | FROM scratch 15 | ARG PYTHON_VERSION 16 | 17 | COPY --from=builder /usr/bin/python3 / 18 | COPY --from=builder /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1 19 | COPY --from=builder /usr/lib/libpython${PYTHON_VERSION}.so.1.0 /usr/lib/libpython${PYTHON_VERSION}.so.1.0 20 | COPY --from=builder /usr/lib/python${PYTHON_VERSION}/ /usr/lib/python${PYTHON_VERSION}/ 21 | 22 | ENTRYPOINT ["/python3"] 23 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 Nikolay Korolev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /Dockerfile.haizaar-minimal: -------------------------------------------------------------------------------- 1 | # This dockerfile was licensed under Apache 2.0 License (see LICENSE-haizaar) 2 | # Source: https://github.com/haizaar/docker-python-minimal 3 | 4 | FROM python:alpine as builder 5 | 6 | RUN apk add --no-cache binutils 7 | RUN find /usr/local -name '*.so' | xargs strip -s 8 | RUN pip uninstall -y pip 9 | RUN set -ex && \ 10 | cd /usr/local/lib/python*/config-*-x86_64-linux-musl/ && \ 11 | rm -rf *.o *.a 12 | RUN rm -rf /usr/local/lib/python*/ensurepip 13 | RUN rm -rf /usr/local/lib/python*/idlelib 14 | RUN rm -rf /usr/local/lib/python*/distutils/command 15 | RUN rm -rf /usr/local/lib/python*/lib2to3 16 | RUN rm -rf /usr/local/lib/python*/__pycache__/* 17 | RUN find /usr/local/include/python* -not -name pyconfig.h -type f -exec rm {} \; 18 | RUN find /usr/local/bin -not -name 'python*' \( -type f -o -type l \) -exec rm {} \; 19 | RUN rm -rf /usr/local/share/* 20 | RUN apk del binutils 21 | 22 | 23 | FROM alpine:latest as final 24 | 25 | ENV LANG C.UTF-8 26 | RUN apk add --no-cache libbz2 expat libffi xz-libs sqlite-libs readline ca-certificates 27 | COPY --from=builder /usr/local/ /usr/local/ 28 | 29 | ENTRYPOINT ["python3"] 30 | -------------------------------------------------------------------------------- /.github/workflows/update-repository.yml: -------------------------------------------------------------------------------- 1 | name: "Update repository with latest information" 2 | 3 | on: 4 | push: 5 | schedule: 6 | # each day at 4:40 7 | - cron: '40 4 * * *' 8 | workflow_dispatch: 9 | 10 | jobs: 11 | update_repository: 12 | name: "Update repository with latest information" 13 | runs-on: ubuntu-latest 14 | 15 | steps: 16 | - name: Checkout to workspace 17 | uses: actions/checkout@v4 18 | 19 | - name: Setup Python 20 | uses: actions/setup-python@v5 21 | with: 22 | python-version: '3.12' 23 | architecture: 'x64' 24 | 25 | - name: Print all environment variables 26 | run: printenv 27 | 28 | - name: Set bot's name and email 29 | run: | 30 | git config --global user.name "Github Action" 31 | git config --global user.email "action@github.com" 32 | 33 | - name: Install requirements.txt 34 | run: | 35 | python -m pip install -U setuptools 36 | python -m pip install -U pip 37 | python -m pip install -r util/requirements.txt 38 | 39 | - name: Update Dockerfile.scratch-minimal and Dockerfile.scratch-full 40 | run: python util/update-scratch-dockerfile-python-versions.py Dockerfile.scratch-minimal Dockerfile.scratch-full 41 | 42 | - name: Update README.rst table 43 | run: python util/update-readme-table.py README.rst . 44 | 45 | - name: Commit changed files 46 | if: always() 47 | run: | 48 | git add README.rst Dockerfile.scratch-minimal Dockerfile.scratch-full && \ 49 | (git commit -m "[Github Action] Update README table and Dockerfile.scratch with latest information" || true) && \ 50 | git checkout . && \ 51 | git pull origin ${GITHUB_REF##*/} --rebase --strategy-option=ours 52 | 53 | - name: Push changes 54 | uses: ad-m/github-push-action@v0.8.0 55 | with: 56 | branch: ${{ github.ref }} 57 | github_token: ${{ secrets.GITHUB_TOKEN }} 58 | -------------------------------------------------------------------------------- /README.rst: -------------------------------------------------------------------------------- 1 | Tiny Python Docker image 2 | ======================== 3 | 4 | The most lightweight Python 3 Docker image possible. 5 | 6 | .. image:: https://github.com/CrafterKolyan/tiny-python-docker-image/actions/workflows/update-repository.yml/badge.svg?branch=main 7 | :target: https://github.com/CrafterKolyan/tiny-python-docker-image/actions/workflows/update-repository.yml 8 | 9 | Possible variants 10 | ----------------- 11 | 12 | .. csv-table:: 13 | :header: Dockerfile,Description,Size,Version 14 | :widths: 10, 70, 10, 10 15 | 16 | Dockerfile.scratch-minimal,Minimal Python image with almost no libraries from scratch,7.566 MB,3.12.12 17 | Dockerfile.scratch-full,Smallest Python image with default libraries from scratch,23.43 MB,3.12.12 18 | Dockerfile.haizaar-minimal,Stripped official Python image (`haizaar/python-minimal`_),37.56 MB,3.14.2 19 | Dockerfile.python-alpine,Python Alpine-based Official,47.38 MB,3.14.2 20 | Dockerfile.alpine,Alpine-based,49.4 MB,3.12.12 21 | Dockerfile.ubuntu,Ubuntu-based,116.7 MB,3.12.3 22 | Dockerfile.python-slim,Minimal packages needed to run python,118.9 MB,3.14.2 23 | Dockerfile.python,Python Debian-based Official with a lot of packages,1116 MB,3.14.2 24 | 25 | Requirements 26 | ------------ 27 | - Docker 28 | 29 | Usage 30 | ----- 31 | Building image 32 | `````````````` 33 | .. code-block:: bash 34 | 35 | docker build -t python-tiny . -f 36 | 37 | For example: 38 | 39 | .. code-block:: bash 40 | 41 | docker build -t python-tiny . -f Dockerfile.scratch-full 42 | 43 | Running image 44 | ````````````` 45 | .. code-block:: bash 46 | 47 | docker run --rm -it python-tiny 48 | 49 | Technologies 50 | ------------ 51 | - Docker 52 | - :code:`ldd` (prints the shared libraries required by each program or shared library specified on the command line): used to create :code:`scratch-full` and :code:`scratch-minimal` images. 53 | 54 | Related links 55 | ------------- 56 | - https://xebia.com/blog/how-to-create-the-smallest-possible-docker-container-of-any-image/ 57 | - https://xebia.com/blog/create-the-smallest-possible-docker-container/ 58 | 59 | Related projects 60 | ---------------- 61 | - https://github.com/jfloff/alpine-python 62 | - https://github.com/haizaar/docker-python-minimal 63 | 64 | .. _haizaar/python-minimal: https://github.com/haizaar/docker-python-minimal 65 | -------------------------------------------------------------------------------- /util/update-scratch-dockerfile-python-versions.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import re 3 | import sys 4 | 5 | import requests 6 | from packaging import version 7 | 8 | python_version_regex = re.compile(r"^(ARG\s+PYTHON_VERSION=).*$") 9 | 10 | 11 | def find_latest_python_alpine_version(): 12 | select_regex = re.compile(r"]* name=\"branch\"[^>]*>([\s\S]*?)") 13 | session = requests.session() 14 | response = session.get("https://pkgs.alpinelinux.org/packages?name=python3") 15 | text = response.text 16 | matches = select_regex.findall(text) 17 | match len(matches): 18 | case 0: 19 | raise ValueError(f"Didn't find branch on the website response") 20 | case 1: 21 | regex_match = matches[0] 22 | case _: 23 | raise ValueError(f"Found two or more branches on the website response: {matches!r}") 24 | option_regex = re.compile(r"]*>([\s\S]*?)") 25 | matches = option_regex.findall(regex_match) 26 | match len(matches): 27 | case 0: 28 | raise ValueError(f"Didn't find options on the website response") 29 | matches = [x.strip() for x in matches] 30 | options = [x for x in matches if x.startswith("v")] 31 | versions = sorted(options, key=lambda x: version.parse(x[1:]), reverse=True) 32 | 33 | for version_ in versions: 34 | print(f"Looking at alpine version: {version_}") 35 | url = f"https://pkgs.alpinelinux.org/packages?name=python3&branch={version_}&repo=main&arch=&maintainer=" 36 | print(url) 37 | response = session.get(url) 38 | text = response.text 39 | 40 | version_regex = re.compile(r"]* class=\"version\"[^>]*>([\s\S]*?)") 41 | matches = version_regex.findall(text) 42 | match len(matches): 43 | case 0: 44 | continue 45 | case _: 46 | break 47 | else: 48 | raise ValueError(f"Didn't find versions on the website response") 49 | matches = [x.strip() for x in matches] 50 | 51 | tag_regex = re.compile(r"<[^>]*>([\s\S]*?)]*>") 52 | new_matches = [] 53 | for x in matches: 54 | match = tag_regex.fullmatch(x) 55 | if match is None: 56 | raise ValueError("Couldn't match on version code to find version text: {x!r}") 57 | new_matches.append(match.group(1)) 58 | matches = new_matches 59 | del new_matches 60 | 61 | versions = [version.parse(x) for x in matches] 62 | release_versions = set(x.release[:2] for x in versions) 63 | printable_versions = [str.join(".", map(str, x)) for x in release_versions] 64 | match len(printable_versions): 65 | case 0: 66 | raise ValueError(f"BUG: Impossible case. Couldn't find any release version") 67 | case 1: 68 | printable_version = printable_versions[0] 69 | case _: 70 | raise ValueError(f"Multiple python versions. Can't select one: {printable_versions}") 71 | return printable_version 72 | 73 | def update_python_version(filepath, version): 74 | with open(filepath, 'r', encoding='utf8') as f: 75 | raw_lines = f.readlines() 76 | updated_lines = raw_lines 77 | for i, line in enumerate(raw_lines): 78 | regex_match = python_version_regex.match(line) 79 | if regex_match: 80 | new_line = regex_match.group(1) + version + "\n" 81 | updated_lines = raw_lines[:i] + [new_line] + raw_lines[i+1:] 82 | break 83 | with open(filepath, 'w', encoding='utf8') as f: 84 | f.writelines(updated_lines) 85 | 86 | 87 | 88 | def main(filepaths): 89 | latest_python_version = find_latest_python_alpine_version() 90 | print(f"Latest python version in alpine repository: {latest_python_version}") 91 | for filepath in filepaths: 92 | update_python_version(filepath, latest_python_version) 93 | return 0 94 | 95 | 96 | if __name__ == '__main__': 97 | parser = argparse.ArgumentParser(description='Update Dockerfile scratch files ') 98 | parser.add_argument('file', type=str, nargs='+', help='path to scratch files') 99 | args = parser.parse_args() 100 | sys.exit(main(args.file)) 101 | -------------------------------------------------------------------------------- /util/update-readme-table.py: -------------------------------------------------------------------------------- 1 | import argparse 2 | import io 3 | import os 4 | import re 5 | import sys 6 | 7 | import docker 8 | import pandas as pd 9 | from tqdm.auto import tqdm 10 | 11 | 12 | def find_all_dockerfiles(path, recursive=False): 13 | dockerfile_regex = re.compile(r"^Dockerfile\..*$") 14 | if not recursive: 15 | dockerfiles = [os.path.join(path, x) for x in os.listdir(path) if dockerfile_regex.fullmatch(x)] 16 | dockerfiles = [x for x in dockerfiles if os.path.isfile(x)] 17 | return dockerfiles 18 | dockerfiles = [] 19 | for address, dirs, files in os.walk(path, topdown=True): 20 | dockerfiles.extend([os.path.join(address, x) for x in files if dockerfile_regex.fullmatch(x)]) 21 | return dockerfiles 22 | 23 | 24 | def find_table(readme): 25 | with open(readme, "r") as f: 26 | raw_lines = f.readlines() 27 | lines = list(map(str.strip, raw_lines)) 28 | table_start = lines.index("", lines.index(".. csv-table::")) + 1 29 | table_end = lines.index("", table_start) 30 | header = lines[table_start - 3][len(":header: "):] 31 | table = [header] + lines[table_start:table_end] 32 | table = pd.read_csv(io.StringIO("\n".join(table))) 33 | 34 | return {'table': table, 'table_start': table_start} 35 | 36 | 37 | def merge_tables(current_table, new_table): 38 | table = current_table.merge(new_table, left_on=current_table.columns[0], right_on='Dockerfile', how='left', 39 | suffixes=('_old', '')) 40 | table.drop(columns=[x for x in table.columns if x.endswith('_old')], inplace=True) 41 | table.sort_values('Size', inplace=True) 42 | table['Size'] = table['Size'].apply(lambda x: f"{x:.04g}") + " MB" 43 | return table 44 | 45 | 46 | def write_table(readme, table, table_start): 47 | s = io.StringIO() 48 | table.to_csv(s, index=False, header=False) 49 | 50 | with open(readme, 'r') as f: 51 | raw_lines = f.readlines() 52 | 53 | lines = raw_lines[:table_start] 54 | for prev_line, new_line in zip(raw_lines[table_start:], s.getvalue().split("\n")): 55 | new_line = prev_line.replace(prev_line.strip(), new_line.strip()) 56 | lines.append(new_line) 57 | lines.extend(raw_lines[table_start + len(table) + 1:]) 58 | with open(readme, 'w') as f: 59 | f.writelines(lines) 60 | 61 | 62 | def update_table(readme, table): 63 | result = find_table(readme) 64 | table = merge_tables(result['table'], table) 65 | write_table(readme, table, result['table_start']) 66 | 67 | 68 | def get_filenames(dockerfiles): 69 | return [os.path.basename(x) for x in dockerfiles] 70 | 71 | 72 | def get_docker_size(path, client): 73 | image, _ = client.images.build(path=os.path.dirname(path), dockerfile=os.path.basename(path), tag="tiny-python") 74 | size = image.attrs['Size'] / (1000 * 1000) 75 | version = client.containers.run(image, "--version", remove=True, stdout=True, stderr=False) 76 | version = version.decode('utf-8').strip().split()[1] 77 | return size, version 78 | 79 | 80 | def main(args): 81 | dockerfiles = sorted(find_all_dockerfiles(args.folder, recursive=args.recursive)) 82 | client = docker.from_env() 83 | sizes = [] 84 | versions = [] 85 | with tqdm(dockerfiles, unit='file') as progress_bar: 86 | for dockerfile in progress_bar: 87 | progress_bar.set_postfix({'dockerfile': os.path.basename(dockerfile)}) 88 | size, version = get_docker_size(dockerfile, client) 89 | sizes.append(size) 90 | versions.append(version) 91 | table = pd.DataFrame({'Dockerfile': get_filenames(dockerfiles), 'Size': sizes, 'Version': versions}) 92 | update_table(args.readme, table) 93 | return 0 94 | 95 | 96 | if __name__ == '__main__': 97 | parser = argparse.ArgumentParser(description='Update readme file according to docker sizes') 98 | parser.add_argument('readme', type=str, help='path to README.rst') 99 | parser.add_argument('folder', type=str, default=".", help='folder with Dockerfiles') 100 | parser.add_argument('-r', '--recursive', action='store_true', help='find Dockerfiles in folders recursively') 101 | args = parser.parse_args() 102 | sys.exit(main(args)) 103 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # Byte-compiled / optimized / DLL files 2 | __pycache__/ 3 | *.py[cod] 4 | *$py.class 5 | 6 | # C extensions 7 | *.so 8 | 9 | # Distribution / packaging 10 | .Python 11 | build/ 12 | develop-eggs/ 13 | dist/ 14 | downloads/ 15 | eggs/ 16 | .eggs/ 17 | lib/ 18 | lib64/ 19 | parts/ 20 | sdist/ 21 | var/ 22 | wheels/ 23 | share/python-wheels/ 24 | *.egg-info/ 25 | .installed.cfg 26 | *.egg 27 | MANIFEST 28 | 29 | # PyInstaller 30 | # Usually these files are written by a python script from a templates 31 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 32 | *.manifest 33 | *.spec 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | 39 | # Unit test / coverage reports 40 | htmlcov/ 41 | .tox/ 42 | .nox/ 43 | .coverage 44 | .coverage.* 45 | .cache 46 | nosetests.xml 47 | coverage.xml 48 | *.cover 49 | *.py,cover 50 | .hypothesis/ 51 | .pytest_cache/ 52 | cover/ 53 | 54 | # Translations 55 | *.mo 56 | *.pot 57 | 58 | # Django stuff: 59 | *.log 60 | local_settings.py 61 | db.sqlite3 62 | db.sqlite3-journal 63 | 64 | # Flask stuff: 65 | instance/ 66 | .webassets-cache 67 | 68 | # Scrapy stuff: 69 | .scrapy 70 | 71 | # Sphinx documentation 72 | docs/_build/ 73 | 74 | # PyBuilder 75 | .pybuilder/ 76 | target/ 77 | 78 | # Jupyter Notebook 79 | .ipynb_checkpoints 80 | 81 | # IPython 82 | profile_default/ 83 | ipython_config.py 84 | 85 | # pyenv 86 | # For a library or package, you might want to ignore these files since the code is 87 | # intended to run in multiple environments; otherwise, check them in: 88 | # .python-version 89 | 90 | # pipenv 91 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 92 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 93 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 94 | # install all needed dependencies. 95 | #Pipfile.lock 96 | 97 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow 98 | __pypackages__/ 99 | 100 | # Celery stuff 101 | celerybeat-schedule 102 | celerybeat.pid 103 | 104 | # SageMath parsed files 105 | *.sage.py 106 | 107 | # Environments 108 | .env 109 | .venv 110 | env/ 111 | venv/ 112 | ENV/ 113 | env.bak/ 114 | venv.bak/ 115 | 116 | # Spyder project settings 117 | .spyderproject 118 | .spyproject 119 | 120 | # Rope project settings 121 | .ropeproject 122 | 123 | # mkdocs documentation 124 | /site 125 | 126 | # mypy 127 | .mypy_cache/ 128 | .dmypy.json 129 | dmypy.json 130 | 131 | # Pyre type checker 132 | .pyre/ 133 | 134 | # pytype static type analyzer 135 | .pytype/ 136 | 137 | # Cython debug symbols 138 | cython_debug/ 139 | 140 | 141 | # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider 142 | # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839 143 | 144 | # User-specific stuff 145 | .idea/**/workspace.xml 146 | .idea/**/tasks.xml 147 | .idea/**/usage.statistics.xml 148 | .idea/**/dictionaries 149 | .idea/**/shelf 150 | 151 | # Generated files 152 | .idea/**/contentModel.xml 153 | 154 | # Sensitive or high-churn files 155 | .idea/**/dataSources/ 156 | .idea/**/dataSources.ids 157 | .idea/**/dataSources.local.xml 158 | .idea/**/sqlDataSources.xml 159 | .idea/**/dynamic.xml 160 | .idea/**/uiDesigner.xml 161 | .idea/**/dbnavigator.xml 162 | 163 | # Gradle 164 | .idea/**/gradle.xml 165 | .idea/**/libraries 166 | 167 | # Gradle and Maven with auto-import 168 | # When using Gradle or Maven with auto-import, you should exclude module files, 169 | # since they will be recreated, and may cause churn. Uncomment if using 170 | # auto-import. 171 | # .idea/artifacts 172 | # .idea/compiler.xml 173 | # .idea/jarRepositories.xml 174 | # .idea/modules.xml 175 | # .idea/*.iml 176 | # .idea/modules 177 | # *.iml 178 | # *.ipr 179 | 180 | # CMake 181 | cmake-build-*/ 182 | 183 | # Mongo Explorer plugin 184 | .idea/**/mongoSettings.xml 185 | 186 | # File-based project format 187 | *.iws 188 | 189 | # IntelliJ 190 | out/ 191 | 192 | # mpeltonen/sbt-idea plugin 193 | .idea_modules/ 194 | 195 | # JIRA plugin 196 | atlassian-ide-plugin.xml 197 | 198 | # Cursive Clojure plugin 199 | .idea/replstate.xml 200 | 201 | # Crashlytics plugin (for Android Studio and IntelliJ) 202 | com_crashlytics_export_strings.xml 203 | crashlytics.properties 204 | crashlytics-build.properties 205 | fabric.properties 206 | 207 | # Editor-based Rest Client 208 | .idea/httpRequests 209 | 210 | # Android studio 3.1+ serialized cache file 211 | .idea/caches/build_file_checksums.ser 212 | 213 | # IDEA folder 214 | .idea 215 | 216 | # Visual Studio Code folder 217 | .vscode -------------------------------------------------------------------------------- /LICENSE-haizaar: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | --------------------------------------------------------------------------------