compose/script/build/linux-entrypoint
Ulysses Souza c217bab7f6 Refactor Dockerfiles for generating musl binaries
- Refactor Dockerfile to be used for tests and distribution on docker hub on debian and alpine
to use for final usage and also tests
- Adapt test scripts to the new Dockerfiles' structure
- Adapt Jenkinsfile to add alpine to the test matrix

Signed-off-by: Ulysses Souza <ulysses.souza@docker.com>
2019-04-17 16:08:33 +02:00

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