compose/script/build/linux-entrypoint

37 lines
912 B
Bash
Executable File

#!/bin/bash
set -ex
CODE_PATH=/code
VENV=${CODE_PATH}/.tox/py37
cd ${CODE_PATH}
mkdir -p dist
chmod 777 dist
${VENV}/bin/pip3 install -q -r requirements-build.txt
# TODO(ulyssessouza) To check if really needed
./script/build/write-git-sha
export PATH="${CODE_PATH}/pyinstaller:${PATH}"
if [ ! -z "${BUILD_BOOTLOADER}" ]; then
# Build bootloader for alpine
git clone --single-branch --branch master https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller
cd /tmp/pyinstaller/bootloader
git checkout v3.4
${VENV}/bin/python3 ./waf configure --no-lsb all
${VENV}/bin/pip3 install ..
cd ${CODE_PATH}
rm -Rf /tmp/pyinstaller
else
echo "NOT compiling bootloader!!!"
fi
${VENV}/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec
ls -la dist/
ldd dist/docker-compose
mv dist/docker-compose /usr/local/bin
docker-compose version