-
Notifications
You must be signed in to change notification settings - Fork 0
/
spotify.Dockerfile
59 lines (43 loc) · 1.49 KB
/
spotify.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
# multi-stage build file
# stages: base, development & production
## base build
FROM archlinux:base-devel AS base
ARG user=makepkg
EXPOSE 6080
ENV TERM='xterm-256color'
ENV EDITOR='vim'
# generate locale
RUN sed -ie 's/^#\(en_US\.UTF-8 UTF-8\)/\1/' /etc/locale.gen && locale-gen
# Install chaotic-aur, see https://aur.chaotic.cx
ENV CHAOTIC_AUR_MIRROR='https://de-3-mirror.chaotic.cx/'
RUN pacman-key --init && \
pacman-key --recv-key FBA220DFC880C036 --keyserver keyserver.ubuntu.com && \
pacman-key --lsign-key FBA220DFC880C036 && \
pacman -U "${CHAOTIC_AUR_MIRROR}/chaotic-aur/chaotic-keyring.pkg.tar.zst" "${CHAOTIC_AUR_MIRROR}/chaotic-aur/chaotic-mirrorlist.pkg.tar.zst" --noconfirm && \
echo "[chaotic-aur]" >> /etc/pacman.conf && \
echo "Include = /etc/pacman.d/chaotic-mirrorlist" >> /etc/pacman.conf
# install packages
RUN pacman -Syu --needed --noconfirm tigervnc xorg-server-xvfb git
# makepkg user and workdir
RUN useradd --system --create-home $user \
&& echo "$user ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers.d/$user
USER $user
WORKDIR /home/$user
# Install yay
RUN git clone https://aur.archlinux.org/yay.git \
&& cd yay \
&& makepkg -sri --needed --noconfirm \
&& cd \
# Clean up
&& rm -rf .cache yay
RUN sudo chown $user:$user -R .
RUN yay -S --noconfirm novnc
USER root
WORKDIR /root
RUN pacman -Scc --noconfirm
# funny part
FROM base
# RUN echo "echo xinitrc!!!" > ~/.xinitrc && chmod +x ~/.xinitrc
COPY startup.sh /root/
RUN chmod +x ~/startup.sh
CMD ~/startup.sh