Mythus commited on
Commit
067b9af
·
verified ·
1 Parent(s): c9c98b0

Update Dockerfile

Browse files
Files changed (1) hide show
  1. 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 the "user" user for non-privileged operations moving forward
31
- USER user
32
 
33
- # Expose the port used by Jackett (default is 9117)
34
- EXPOSE 9117
35
 
36
- # Switch back to root to set up Jackett as a service
37
- USER root
38
 
39
- # Install Jackett as a systemd service
40
- WORKDIR /opt/Jackett/Jackett*
41
- RUN ./install_service_systemd.sh
 
 
 
 
 
 
 
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"]