linux-entrypoint 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. #!/bin/bash
  2. set -ex
  3. CODE_PATH=/code
  4. VENV="${CODE_PATH}"/.tox/py37
  5. cd "${CODE_PATH}"
  6. mkdir -p dist
  7. chmod 777 dist
  8. "${VENV}"/bin/pip3 install -q -r requirements-build.txt
  9. # TODO(ulyssessouza) To check if really needed
  10. if [ -z "${DOCKER_COMPOSE_GITSHA}" ]; then
  11. DOCKER_COMPOSE_GITSHA="$(script/build/write-git-sha)"
  12. fi
  13. echo "${DOCKER_COMPOSE_GITSHA}" > compose/GITSHA
  14. export PATH="${CODE_PATH}/pyinstaller:${PATH}"
  15. if [ ! -z "${BUILD_BOOTLOADER}" ]; then
  16. # Build bootloader for alpine; develop is the main branch
  17. git clone --single-branch --branch develop https://github.com/pyinstaller/pyinstaller.git /tmp/pyinstaller
  18. cd /tmp/pyinstaller/bootloader
  19. # Checkout commit corresponding to version in requirements-build
  20. git checkout v3.5
  21. "${VENV}"/bin/python3 ./waf configure --no-lsb all
  22. "${VENV}"/bin/pip3 install ..
  23. cd "${CODE_PATH}"
  24. rm -Rf /tmp/pyinstaller
  25. else
  26. echo "NOT compiling bootloader!!!"
  27. fi
  28. "${VENV}"/bin/pyinstaller --exclude-module pycrypto --exclude-module PyInstaller docker-compose.spec
  29. ls -la dist/
  30. ldd dist/docker-compose
  31. mv dist/docker-compose /usr/local/bin
  32. docker-compose version