Update Dockerfile
Browse files- Dockerfile +16 -9
Dockerfile
CHANGED
|
@@ -27,18 +27,25 @@ RUN release=$(wget -q https://github.com/Jackett/Jackett/releases/latest -O - |
|
|
| 27 |
tar -xzf /opt/"$f" -C /opt/Jackett && \
|
| 28 |
rm /opt/"$f"
|
| 29 |
|
| 30 |
-
# Switch to
|
| 31 |
-
USER
|
| 32 |
|
| 33 |
-
#
|
| 34 |
-
|
| 35 |
|
| 36 |
-
#
|
| 37 |
-
|
| 38 |
|
| 39 |
-
#
|
| 40 |
-
|
| 41 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
# Set the default command to check the status of Jackett service
|
| 44 |
CMD ["systemctl", "status", "jackett.service"]
|
|
|
|
| 27 |
tar -xzf /opt/"$f" -C /opt/Jackett && \
|
| 28 |
rm /opt/"$f"
|
| 29 |
|
| 30 |
+
# Switch to root to install Jackett as a systemd service
|
| 31 |
+
USER root
|
| 32 |
|
| 33 |
+
# Verify that the script exists and set the correct working directory
|
| 34 |
+
WORKDIR /opt/Jackett
|
| 35 |
|
| 36 |
+
# List the contents of the Jackett directory to verify script presence
|
| 37 |
+
RUN ls -l /opt/Jackett
|
| 38 |
|
| 39 |
+
# Run the service installation script explicitly if it's found
|
| 40 |
+
RUN if [ -f /opt/Jackett/install_service_systemd.sh ]; then \
|
| 41 |
+
/opt/Jackett/install_service_systemd.sh; \
|
| 42 |
+
else \
|
| 43 |
+
echo "Error: install_service_systemd.sh not found!"; \
|
| 44 |
+
exit 1; \
|
| 45 |
+
fi
|
| 46 |
+
|
| 47 |
+
# Expose the port used by Jackett (default is 9117)
|
| 48 |
+
EXPOSE 9117
|
| 49 |
|
| 50 |
# Set the default command to check the status of Jackett service
|
| 51 |
CMD ["systemctl", "status", "jackett.service"]
|