2024-04-11 14:45:58 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# Custom script to install Python on top of a Docker Node-JS image, then install
|
|
|
|
# required Python deps, generate fuzzy rules, and finally bundle JS script
|
|
|
|
|
|
|
|
apt-get update -y
|
|
|
|
|
|
|
|
apt-get install -y --no-install-recommends \
|
|
|
|
python3 python3-pip python3-venv
|
|
|
|
|
|
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
python3 -m venv /local
|
|
|
|
|
|
|
|
/local/bin/python -m pip install --no-cache-dir -U \
|
|
|
|
pip \
|
2024-06-25 11:55:39 +00:00
|
|
|
jinja2==3.1.4 \
|
2024-08-09 07:04:28 +00:00
|
|
|
PyYAML==6.0.2
|
2024-04-11 14:45:58 +00:00
|
|
|
|
|
|
|
/local/bin/python /src/rules/generate_rules.py
|
|
|
|
|
|
|
|
cd /src/javascript
|
|
|
|
|
2024-05-24 14:31:07 +00:00
|
|
|
yarn install
|
|
|
|
|
2024-04-11 14:45:58 +00:00
|
|
|
OUTPUT_DIR=/output yarn build-prod
|