-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathDockerfile
31 lines (23 loc) · 1008 Bytes
/
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
FROM alpine:latest
ARG user
ARG password
RUN apk add build-base luajit luarocks5.1 lua5.1-dev openssl-dev alsa-utils pianobar git nano htop
WORKDIR /opt/remodora
COPY . ./
RUN luarocks-5.1 install turbo
RUN luarocks-5.1 install luajson
RUN luarocks-5.1 install penlight
RUN luarocks-5.1 install luasocket
RUN mkdir --parents ~/.config/pianobar
RUN cp ./src/support/events.lua ~/.config/pianobar/events.lua
RUN sed -i "s|%s|/root/.config/pianobar|g" ~/.config/pianobar/events.lua
RUN chmod +x ~/.config/pianobar/events.lua
RUN mkfifo ~/.config/pianobar/ctl
# Write initial config
RUN echo "user = $user" >> ~/.config/pianobar/config
RUN echo "password = $password" >> ~/.config/pianobar/config
RUN echo "sort = quickmix_10_name_az" >> ~/.config/pianobar/config
RUN echo "audio_quality = high" >> ~/.config/pianobar/config
RUN echo "event_command = /root/.config/pianobar/events.lua" >> ~/.config/pianobar/config
RUN echo "fifo = /root/.config/pianobar/ctl" >> ~/.config/pianobar/config
CMD ./remodora