build deps agora instalam em runtime
This commit is contained in:
parent
71ce56ecb0
commit
85d6619ac7
@ -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
|
||||
|
10
build.sh
10
build.sh
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user