Mythus commited on
Commit
fe131df
·
verified ·
1 Parent(s): c7aae32

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +7 -15
Dockerfile CHANGED
@@ -27,25 +27,17 @@ 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 root to install Jackett as a systemd service
31
  USER root
32
 
33
- # Verify that the script exists in the Jackett subdirectory
34
- WORKDIR /opt/Jackett/Jackett
35
 
36
- # List the contents of the directory to verify the script is there
37
- RUN ls -l /opt/Jackett/Jackett
38
-
39
- # Run the service installation script explicitly if it's found
40
- RUN if [ -f /opt/Jackett/Jackett/install_service_systemd.sh ]; then \
41
- /opt/Jackett/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"]
 
27
  tar -xzf /opt/"$f" -C /opt/Jackett && \
28
  rm /opt/"$f"
29
 
30
+ # Switch to root to change the ownership of the Jackett directory
31
  USER root
32
 
33
+ # Change the owner of /opt/Jackett/Jackett to user (ID 1000)
34
+ RUN chown -R user:user /opt/Jackett
35
 
36
+ # Switch to the user to run Jackett
37
+ USER user
 
 
 
 
 
 
 
 
38
 
39
  # Expose the port used by Jackett (default is 9117)
40
  EXPOSE 9117
41
 
42
+ # Set the default command to run Jackett manually
43
+ CMD ["/opt/Jackett/Jackett/jackett"]