-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
69 lines (64 loc) · 2.2 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
FROM ubuntu:24.04
ARG DEBIAN_FRONTEND=noninteractive
# Set environment variables
ENV LOGIN= \
PASSW= \
DARKMODE= \
TZ= \
LANG= \
UMASK= \
PUID=1000 \
PGID=1000 \
UPNP=False \
AUTO_CONNECT=True \
TRAY_ICON=False \
NOTIFY_FILE=False \
NOTIFY_FOLDER=False \
NOTIFY_TITLE=False \
NOTIFY_PM=False \
NOTIFY_CHATROOM=False \
NOTIFY_MENTION=False \
WEB_UI_PORT=6565
# Expose port for the application
EXPOSE ${WEB_UI_PORT}
# Install dependencies and necessary packages
RUN apt-get update && apt-get install -y gir1.2-gtk-3.0 \
&& apt-get install -y --no-install-recommends \
software-properties-common \
gsettings-desktop-schemas \
gir1.2-adw-1 \
gir1.2-gspell-1 \
python3-gi \
python3-gi-cairo \
fonts-noto-cjk \
gettext \
nginx \
tzdata \
locales \
# Delete default ubuntu user claiming 1000:1000, create nicotine user and group
&& userdel -r ubuntu \
&& groupadd -g ${PGID} nicotine \
&& useradd -u ${PUID} -g ${PGID} -m -s /bin/bash nicotine \
# Create directories, symobolic links, and set permissions
&& mkdir -p /home/nicotine/.config/nicotine /home/nicotine/.local/share/nicotine/plugins /home/nicotine/.config/dconf \
&& ln -s /home/nicotine/.config/nicotine /config \
&& ln -s /home/nicotine/.local/share/nicotine /data \
&& ln -s /home/nicotine/.local/share/nicotine/plugins /data/plugins \
&& chown -R nicotine:nicotine /config /data /home/nicotine/.config /home/nicotine/.local /var/log \
# Add Nicotine+ repository, install Nicotine+, and cleanup
&& add-apt-repository ppa:nicotine-team/stable \
&& apt-get install -y nicotine \
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get autoremove -y \
&& apt-get autoclean \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# Import configuration files and launch scripts
COPY config-default /home/nicotine/config-default
COPY default /etc/nginx/sites-available/default
COPY favicon.ico /var/www/favicon.ico
COPY init.sh /usr/local/bin/init.sh
COPY launch.sh /usr/local/bin/launch.sh
# Run Nicotine+ startup script
CMD ["/usr/local/bin/init.sh"]