diff --git a/Dockerfile b/Dockerfile index 1e816b3..a2cb9cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -21,6 +21,8 @@ RUN cargo build --release # Now make the runtime container FROM debian:bookworm-slim AS runtime +COPY sparse-checkout.sh . + RUN apt-get update && apt-get upgrade -y && \ apt-get install -y openssl ca-certificates git subversion make autoconf automake libtool pkg-config g++ && \ apt-get clean && \ @@ -31,7 +33,7 @@ RUN apt-get update && apt-get upgrade -y && \ # Build and install mbrola git clone https://github.com/numediart/MBROLA --depth 1 && cd MBROLA && make && cp Bin/mbrola /usr/bin/mbrola && cd .. && rm -rf MBROLA && \ # Download the mbrola voices to /usr/share/mbrola. - svn export https://github.com/numediart/MBROLA-voices/trunk/data /usr/share/mbrola + ./sparse-checkout.sh https://github.com/numediart/MBROLA-voices /usr/share/mbrola && mv /usr/share/mbrola/data/* /usr/share/mbrola && rm -r /usr/share/mbrola/data # Download tini to avoid zombie processes ADD https://github.com/krallin/tini/releases/latest/download/tini /usr/local/bin/tini diff --git a/sparse-checkout.sh b/sparse-checkout.sh new file mode 100755 index 0000000..b511617 --- /dev/null +++ b/sparse-checkout.sh @@ -0,0 +1,18 @@ +#!/usr/bin/bash + +rurl="$1" localdir="$2" && shift 2 + +mkdir -p "$localdir" +cd "$localdir" + +git init +git remote add -f origin "$rurl" + +git config core.sparseCheckout true + +# Loops over remaining args +for i; do +echo "$i" >> .git/info/sparse-checkout +done + +git pull --depth 1 origin master