-
Notifications
You must be signed in to change notification settings - Fork 34
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·68 lines (56 loc) · 2.02 KB
/
Dockerfile
File metadata and controls
executable file
·68 lines (56 loc) · 2.02 KB
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
# Single-stage build for installing Python dependencies and required packages
FROM python:3.11-slim
# Copy requirements.txt and install Python dependencies
COPY requirements.txt .
# Install required packages and Python dependencies
RUN set -eux; \
apt-get update && \
apt-get install -y --no-install-recommends \
gcc wget curl unzip p7zip-full tzdata jq git build-essential && \
pip3 install --no-cache-dir -r requirements.txt && \
curl https://rclone.org/install.sh | bash && \
git clone https://codeberg.org/jbruchon/libjodycode.git /tmp/libjodycode && \
make -C /tmp/libjodycode && make -C /tmp/libjodycode install && \
ldconfig && \
git clone https://codeberg.org/jbruchon/jdupes.git /tmp/jdupes && \
make -C /tmp/jdupes && make -C /tmp/jdupes install && \
ln -s /usr/local/bin/jdupes /usr/bin/jdupes && \
rm -rf /tmp/libjodycode /tmp/jdupes
# Clean up
RUN set -eux; \
apt-get remove -y --purge gcc build-essential && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
# Metadata and labels
LABEL maintainer="Drazzilb" \
description="daps" \
org.opencontainers.image.source="https://github.com/Drazzilb08/daps" \
org.opencontainers.image.authors="Drazzilb" \
org.opencontainers.image.title="daps"
# Branch and build number arguments
ARG BRANCH="master"
ARG BUILD_NUMBER=""
# Pass the build-time BRANCH arg into a runtime environment variable
ENV BRANCH=${BRANCH}
ENV BUILD_NUMBER=${BUILD_NUMBER}
ARG CONFIG_DIR=/config
# Set script environment variables
ENV CONFIG_DIR=/config
ENV APPDATA_PATH=/appdata
ENV LOG_DIR=/config/logs
ENV TZ=America/Los_Angeles
ENV PORT=8000
ENV HOST=0.0.0.0
ENV DOCKER_ENV=true
# Expose the application port
EXPOSE ${PORT}
VOLUME /config
WORKDIR /app
COPY . .
# Create a new user called dockeruser with the specified PUID and PGID
RUN groupadd -g 99 dockeruser; \
useradd -u 100 -g 99 dockeruser; \
chown -R dockeruser:dockeruser /app;
# Entrypoint script
CMD ["bash", "start.sh"]