ajout download.odoo.Dockerfile.sh
This commit is contained in:
parent
44d848d981
commit
2bee146b30
1 changed files with 25 additions and 0 deletions
25
config-odoo/download.odoo.Dockerfile.sh
Normal file
25
config-odoo/download.odoo.Dockerfile.sh
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
#!/usr/bin/env bash
|
||||
set -euo pipefail
|
||||
|
||||
|
||||
# recupérer le commit sur l'url
|
||||
# par exemple :
|
||||
# URL : https://github.com/odoo/docker/tree/b8b9102bf64e67d7baeaa410ff506dbe16fa8dfe/18.0
|
||||
# Commit ! b8b9102bf64e67d7baeaa410ff506dbe16fa8dfe
|
||||
#
|
||||
|
||||
COMMIT="b8b9102bf64e67d7baeaa410ff506dbe16fa8dfe"
|
||||
BASE="https://raw.githubusercontent.com/odoo/docker/${COMMIT}/18.0"
|
||||
DEST="./"
|
||||
FILES=(Dockerfile entrypoint.sh odoo.conf wait-for-psql.py)
|
||||
|
||||
mkdir -p "${DEST}"
|
||||
for f in "${FILES[@]}"; do
|
||||
curl -fsSL "${BASE}/${f}" -o "${DEST}/${f}"
|
||||
done
|
||||
chmod +x "${DEST}/entrypoint.sh" "${DEST}/wait-for-psql.py"
|
||||
|
||||
sed -i 's/curl \\/curl vim \\/' "${DEST}/Dockerfile"
|
||||
sed -i 's|^COPY \./entrypoint\.sh /$|COPY ./requirements.txt /tmp/requirements.txt\nRUN pip install --no-cache-dir --break-system-packages -r /tmp/requirements.txt\nCOPY ./entrypoint.sh /|' "${DEST}/Dockerfile"
|
||||
|
||||
echo "OK. ${#FILES[@]} fichiers dans ${DEST}"
|
||||
Loading…
Reference in a new issue