-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
78 lines (52 loc) · 1.33 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
ARG BASE_IMAGE="${BASE_IMAGE:-python:slim}"
FROM ${BASE_IMAGE} AS BASE
ARG USE_APT_PROXY
RUN mkdir -p /app/conf
COPY app/conf/01proxy /app/conf/
RUN if [ "$USE_APT_PROXY" = "Y" ]; then \
echo "Using apt proxy"; \
cp /app/conf/01proxy /etc/apt/apt.conf.d/01proxy; \
echo /etc/apt/apt.conf.d/01proxy; \
else \
echo "Building without proxy"; \
fi
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update
RUN apt-get install -y git
RUN apt-get install -y gcc
RUN apt-get install -y python3-dev
RUN mkdir /src
WORKDIR /src
RUN git clone https://github.com/Berulacks/yams.git
WORKDIR /src/yams
RUN pip install --upgrade pip
RUN pip install -r requirements.txt
RUN pip3 install .
RUN rm /src -Rf
RUN apt-get remove -y python3-dev
RUN apt-get remove -y gcc
RUN apt-get remove -y git
RUN apt-get autoremove -y
RUN rm -rf /var/lib/apt/lists/*
FROM scratch
COPY --from=BASE / /
LABEL maintainer="GioF71"
LABEL source="https://github.com/GioF71/yams-docker"
RUN mkdir -p /data
RUN mkdir -p /app/bin
RUN mkdir -p /app/log
RUN chmod -R 755 /app
VOLUME /data
ENV STARTUP_DELAY_SEC ""
ENV MPD_HOST=""
ENV MPD_PORT=""
ENV USER_MODE=""
ENV PUID=""
ENV PGID=""
ENV API_KEY=""
ENV API_SECRET=""
ENV SESSION_FILE=""
COPY app/bin/run-yams.sh /app/bin/run-yams.sh
RUN chmod 755 /app/bin/run-yams.sh
WORKDIR /app/bin
ENTRYPOINT ["/app/bin/run-yams.sh"]