Last active
May 21, 2023 06:57
-
-
Save pmp-p/bcefc97dbc7b6aa263f5817b69df6cd3 to your computer and use it in GitHub Desktop.
build midipix via docker alpine:latest + midipix_build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
echo "The serial file in that directory should contains something like: export KEY=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" | |
. serial | |
mkdir -p work | |
cat > work/docker_midipix_build.sh <<EOS | |
apk update | |
apk upgrade | |
echo | |
if [ -f /work/detect-proxy.sh ] | |
then | |
echo " --- trying docker-proxy ---" | |
apk add bash netcat-openbsd ca-certificates | |
/bin/bash /work/detect-proxy.sh | |
if [ -f /usr/local/share/ca-certificates/docker-proxy.crt ] | |
then | |
update-ca-certificates /usr/local/share/ca-certificates/docker-proxy.crt | |
apk add git | |
git config --global http.sslCAInfo /usr/local/share/ca-certificates/docker-proxy.crt | |
else | |
echo "*ERROR* failed to configure docker-proxy" | |
fi | |
else | |
echo "*WARNING* maybe use docker-proxy https://github.com/silarsis/docker-proxy to speed up builds" | |
fi | |
echo | |
echo | |
export PS1="docker-alpine-midipix:\[\e[33m\]\w\[\e[0m\] \$ " | |
export HOME=/work | |
cd \$HOME | |
apk add \$(cat <<EOF | |
autoconf | |
automake | |
bison | |
bzip2-dev | |
coreutils | |
expat-dev | |
flex | |
g++ | |
gcc | |
gdbm-dev | |
gettext-dev | |
git | |
gmp-dev | |
grep | |
groff | |
libffi-dev | |
libgmpxx | |
libintl | |
libmagic | |
libtool | |
linux-headers | |
make | |
mpc1-dev | |
mpfr-dev | |
musl-dev | |
ncurses-dev | |
openssl-dev | |
patch | |
pcre-dev | |
perl-xml-parser | |
procps | |
python | |
readline-dev | |
sed | |
sqlite-dev | |
tar | |
texinfo | |
wget | |
xz | |
zip | |
zlib-dev | |
openssl | |
ncurses | |
EOF | |
); | |
cd /work | |
if [ -d midipix_build ] | |
then | |
echo | |
echo "upgrading midipix_build from https://github.com/lalbornoz/midipix_build" | |
cd midipix_build/ | |
git pull | |
else | |
git clone --recursive https://github.com/lalbornoz/midipix_build | |
cd midipix_build | |
fi | |
DEFAULT_GITROOT_HEAD=git://midipix.org/$KEY ./build.sh -R -P 1 --debug-minipix -a nt64 -C build $@ | |
#alpine has no multilib gcc | |
#./build.sh -R -P 1 --debug-minipix -a nt32 -C build | |
exec /bin/bash -i | |
EOS | |
docker run --cpus=0.5 --cpu-shares=512 -v$(pwd)/work:/work --tty=true --rm=false --interactive=true alpine:latest /bin/sh /work/docker_midipix_build.sh |
thanks for remarks, added a comment at the top regarding the repo key
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Known 'issue' apparently: #https://github.com/lalbornoz/midipix_build/issues/8
FYI: