-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Dockerfile
48 lines (42 loc) · 1.25 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
FROM debian:bookworm-slim
ENV DEBIAN_FRONTEND="noninteractive" \
HOME="/root" \
LANGUAGE="en_US.UTF-8" \
LANG="en_US.UTF-8" \
LC_ALL="en_US.UTF-8" \
TERM="xterm"
# Set up the container
RUN set -x && \
apt-get update && \
# Set locale
apt-get -y --no-install-recommends install locales && \
echo "en_US.UTF-8 UTF-8" > /etc/locale.gen && \
locale-gen en_US.UTF-8 && \
# Install required distro packages
apt-get -y --no-install-recommends install \
git \
gosu \
python3 \
python3-dev \
python3-pip && \
# Create a 'app' user which the service will run as
groupadd app && \
useradd -M -d /app -s /bin/false -g app app && \
# Clean up
apt-get -y autoremove && \
apt-get -y autoclean && \
rm -rf /var/lib/apt/lists/* && \
rm -rf /var/cache/apt/* && \
rm -rf /tmp/
RUN set -x && \
# Allow root to use sudo
echo "root ALL = NOPASSWD: /bin/su ALL" >> /etc/sudoers && \
# Install BandcampSync
python3 -m pip install --break-system-packages git+https://github.com/meeb/bandcampsync.git@v0.4.1#egg=bandcampsync
# Volumes
VOLUME ["/config", "/downloads"]
# Set the 'app' user UID and GID in the entrypoint
COPY entrypoint.sh /entrypoint.sh
ENTRYPOINT ["/entrypoint.sh"]
# Run the service
CMD ["bandcampsync-service"]