-
-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathDockerfile
52 lines (41 loc) · 1.58 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
45
46
47
48
49
50
51
52
FROM node:16-alpine3.17 AS builder-frontend
WORKDIR /src
COPY betanin_client/ .
RUN npm install && \
PRODUCTION=true npm run-script build
FROM alpine:3.18 AS builder-mp3gain
WORKDIR /tmp
COPY alpine/mp3gain/APKBUILD .
RUN apk update && \
apk add --no-cache abuild && \
abuild-keygen -a -n && \
REPODEST=/tmp/out abuild -F -r
FROM alpine:3.18 AS builder-mp3val
WORKDIR /tmp
COPY alpine/mp3val/APKBUILD .
RUN apk update && \
apk add --no-cache abuild && \
abuild-keygen -a -n && \
REPODEST=/tmp/out abuild -F -r
FROM alpine:3.18
LABEL org.opencontainers.image.source https://github.com/sentriz/betanin
WORKDIR /src
COPY . .
COPY --from=builder-frontend /src/dist/ /src/betanin_client/dist/
COPY --from=builder-mp3gain /tmp/out/*/*.apk /pkgs/
COPY --from=builder-mp3val /tmp/out/*/*.apk /pkgs/
ENV UID=1000
ENV GID=1000
RUN apk add --no-cache --upgrade --virtual=build-dependencies build-base cmake libffi-dev openssl-dev python3-dev jpeg-dev libpng-dev zlib-dev jpeg-dev cargo llvm14-dev openblas openblas-dev && \
apk add --no-cache --upgrade sudo python3 py-pip libev chromaprint ffmpeg gstreamer flac keyfinder-cli libsndfile && \
apk add --no-cache --allow-untrusted /pkgs/* && \
env LLVM_CONFIG="$(which llvm14-config)" pip install --no-cache-dir . --requirement requirements-docker.txt && \
apk del --purge build-dependencies && \
rm -r /pkgs ~/.cache
VOLUME /b/.local/share/betanin/
VOLUME /b/.config/betanin/
VOLUME /b/.config/beets/
ENV HOME=/b
ENV PYTHONUNBUFFERED=1
ENV PYTHONWARNINGS="ignore:Unverified HTTPS request"
ENTRYPOINT [ "/src/docker-entry" ]