-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
44 lines (37 loc) · 1.44 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
FROM alpine:latest as builder
RUN apk add --no-cache boost-dev boost-static cmake curl g++ gcc gd-dev git \
jq libid3tag-dev libmad-dev libpng-static libsndfile-dev libvorbis-static make zlib-static
RUN apk add --no-cache autoconf automake libtool gettext && \
curl -fL# "$(curl -s 'https://api.github.com/repos/xiph/flac/tags' | jq -r '. | first | .tarball_url')" -o flac.tar.gz && \
mkdir flac && \
tar -xf flac.tar.gz -C flac --strip-components=1 && \
cd flac && \
./autogen.sh && \
./configure --enable-shared=no && \
make -j $(nproc) && \
make install
RUN git clone -n https://github.com/bbc/audiowaveform.git && \
cd audiowaveform && \
git checkout ${COMMIT} && \
curl -fL# "$(curl -s 'https://api.github.com/repos/google/googletest/releases/latest' | jq -r '.tarball_url')" -o googletest.tar.gz && \
mkdir googletest && \
tar -xf googletest.tar.gz -C googletest --strip-components=1 && \
mkdir build && \
cd build && \
cmake -D ENABLE_TESTS=1 -D BUILD_STATIC=1 .. && \
make -j $(nproc) && \
# /audiowaveform/build/audiowaveform_tests && \
make install && \
strip /usr/local/bin/audiowaveform
FROM node:alpine
RUN apk add --no-cache libstdc++
COPY --from=builder /usr/local/bin/audiowaveform /usr/local/bin/audiowaveform
USER root
ENV NODE_ENV=production
WORKDIR /
COPY .env.example .env
COPY package.json .
COPY src /src
RUN yarn install --pure-lockfile
EXPOSE 5005
CMD yarn start