2022-04-20 08:58:03 +00:00
|
|
|
FROM golang:1.18-bullseye
|
2022-03-02 18:11:12 +00:00
|
|
|
|
|
|
|
WORKDIR /src
|
|
|
|
|
2022-07-20 10:13:39 +00:00
|
|
|
ENV CFLAGS="-march=native -Ofast -flto"
|
|
|
|
ENV CXXFLAGS="-march=native -Ofast -flto"
|
|
|
|
ENV LDFLAGS="-flto"
|
|
|
|
ENV CGO_CFLAGS="-march=native -Ofast"
|
|
|
|
|
2022-03-02 18:11:12 +00:00
|
|
|
RUN DEBIAN_FRONTEND=noninteractive apt update && \
|
|
|
|
DEBIAN_FRONTEND=noninteractive apt install -y \
|
2022-07-20 10:13:39 +00:00
|
|
|
git build-essential autoconf automake cmake make libtool libtool-bin gettext \
|
2022-07-20 10:18:11 +00:00
|
|
|
libssl-dev libebur128-dev && \
|
2022-07-20 10:13:39 +00:00
|
|
|
git clone --depth 1 --branch 0.2.2 https://github.com/libsndfile/libsamplerate.git && cd libsamplerate && \
|
2022-03-02 18:11:12 +00:00
|
|
|
./autogen.sh && \
|
|
|
|
./configure --prefix /usr && \
|
2022-07-21 14:28:15 +00:00
|
|
|
make -j$(nproc) && \
|
2022-07-20 10:13:39 +00:00
|
|
|
make install && \
|
|
|
|
cd .. && \
|
|
|
|
wget https://downloads.sourceforge.net/project/lame/lame/3.100/lame-3.100.tar.gz -O lame-3.100.tar.gz && \
|
|
|
|
tar -xzvf lame-3.100.tar.gz && \
|
|
|
|
cd lame-3.100 && \
|
|
|
|
./configure --prefix /usr && \
|
2022-07-21 14:28:15 +00:00
|
|
|
make -j$(nproc) && \
|
2022-07-20 10:13:39 +00:00
|
|
|
make install && \
|
|
|
|
cd .. && \
|
|
|
|
git clone --depth 1 --branch v1.3.5 https://github.com/xiph/ogg.git && cd ogg && \
|
|
|
|
./autogen.sh && \
|
|
|
|
./configure --prefix /usr && \
|
2022-07-21 14:28:15 +00:00
|
|
|
make -j$(nproc) && \
|
2022-07-20 10:13:39 +00:00
|
|
|
make install && \
|
|
|
|
cd .. && \
|
|
|
|
git clone --branch master https://github.com/xiph/opus.git && cd opus && \
|
|
|
|
./autogen.sh && \
|
|
|
|
./configure --enable-float-approx --prefix /usr && \
|
2022-07-21 14:28:15 +00:00
|
|
|
make -j$(nproc) && \
|
2022-07-20 10:13:39 +00:00
|
|
|
make install && \
|
|
|
|
cd .. && \
|
|
|
|
git clone --depth 1 --branch v0.12 https://github.com/xiph/opusfile.git && cd opusfile && \
|
|
|
|
./autogen.sh && \
|
|
|
|
./configure --prefix /usr && \
|
2022-07-21 14:28:15 +00:00
|
|
|
make -j$(nproc) && \
|
2022-07-20 10:13:39 +00:00
|
|
|
make install && \
|
|
|
|
cd .. && \
|
|
|
|
git clone --depth 1 --branch master https://github.com/xiph/libopusenc.git && cd libopusenc && \
|
|
|
|
./autogen.sh && \
|
|
|
|
./configure --prefix /usr && \
|
2022-07-21 14:28:15 +00:00
|
|
|
make -j$(nproc) && \
|
2022-07-20 10:13:39 +00:00
|
|
|
make install && \
|
|
|
|
cd .. && \
|
|
|
|
git clone --depth 1 --branch 1.3.4 https://github.com/xiph/flac.git && cd flac && \
|
|
|
|
./autogen.sh && \
|
|
|
|
./configure --prefix /usr && \
|
2022-07-21 14:28:15 +00:00
|
|
|
make -j$(nproc) && \
|
2022-07-20 10:13:39 +00:00
|
|
|
make install && \
|
2022-03-02 18:11:12 +00:00
|
|
|
cd .. && \
|
|
|
|
git clone --depth 1 https://github.com/mstorsjo/fdk-aac.git && cd fdk-aac && \
|
|
|
|
./autogen.sh && \
|
|
|
|
./configure --prefix /usr && \
|
|
|
|
make -j$(nproc) && \
|
|
|
|
make install && \
|
|
|
|
cd .. && \
|
2022-04-21 12:06:35 +00:00
|
|
|
git clone --depth 1 https://git.gammaspectra.live/S.O.N.G/alac.git && cd alac && \
|
|
|
|
autoreconf -fi && \
|
|
|
|
./configure --prefix /usr && \
|
|
|
|
make -j$(nproc) && \
|
|
|
|
make install && \
|
|
|
|
cd .. && \
|
2022-07-20 10:13:39 +00:00
|
|
|
rm -rf /src/libsamplerate /src/libebur128 /src/lame-3.100 /src/ogg /src/opus /src/opusfile /src/flac /src/libopusenc /src/fdk-aac /src/alac
|
2022-03-02 18:11:12 +00:00
|
|
|
|
|
|
|
COPY . /code
|
|
|
|
WORKDIR /code
|
2022-07-20 10:13:39 +00:00
|
|
|
|
2022-03-02 18:11:12 +00:00
|
|
|
RUN go build -v -o /usr/bin/MeteorLight . && rm -rf /code
|
|
|
|
|
|
|
|
|
|
|
|
WORKDIR /
|
|
|
|
ENTRYPOINT ["/usr/bin/MeteorLight"]
|