build deps agora instalam em runtime

This commit is contained in:
Glauber Ferreira 2022-05-20 11:54:22 -03:00
parent 71ce56ecb0
commit 85d6619ac7
2 changed files with 8 additions and 4 deletions

View File

@ -1,5 +1,5 @@
FROM alpine:3.15
RUN apk add --no-cache bash git make cmake git g++ gcc python3 lua perl
RUN apk add --no-cache bash
COPY build.sh /build.sh
ENTRYPOINT ["/bin/bash","/build.sh"]
VOLUME /out

View File

@ -1,9 +1,13 @@
#!/bin/bash
set -e
apk add git make cmake git g++ gcc python3 lua perl jq curl
mkdir /build
git clone --recursive https://github.com/cuberite/cuberite.git /build/cuberite
tag=$(curl -sL https://api.github.com/repos/cuberite/cuberite/releases/latest | jq -r ".tag_name")
echo "tag: $tag"
sleep 5
git clone --recursive https://github.com/cuberite/cuberite.git -b "$tag" /build/cuberite
mkdir /build/cuberite/Release
cd /build/cuberite/Release
cmake -DNO_NATIVE_OPTIMIZATION=1 -DCMAKE_BUILD_TYPE=RELEASE ..
make -j`nproc`
tar zcvf Server /out/cuberite.tar.gz
make
tar zcvf "/out/cuberite-$tag.tar.gz" Server