Mythus commited on
Commit
82f68ea
·
verified ·
1 Parent(s): ad69728

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +17 -4
Dockerfile CHANGED
@@ -9,11 +9,24 @@ ARG JACKETT_RELEASE
9
  LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
10
  LABEL maintainer="thelamer"
11
 
12
- # environment settings
13
  ENV XDG_DATA_HOME="/config" \
14
  XDG_CONFIG_HOME="/config" \
15
  TMPDIR=/run/jackett-temp
16
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  RUN \
18
  echo "**** install packages ****" && \
19
  apk --no-cache add \
@@ -41,10 +54,10 @@ RUN \
41
  rm -rf \
42
  /tmp/*
43
 
44
- # add local files
45
- COPY root/ /
46
 
47
  # ports and volumes
48
  VOLUME /config
49
 
50
- EXPOSE 9117
 
9
  LABEL build_version="Linuxserver.io version:- ${VERSION} Build-date:- ${BUILD_DATE}"
10
  LABEL maintainer="thelamer"
11
 
12
+ # environment settings
13
  ENV XDG_DATA_HOME="/config" \
14
  XDG_CONFIG_HOME="/config" \
15
  TMPDIR=/run/jackett-temp
16
 
17
+ # Create a user with UID 1000 to avoid permission issues
18
+ RUN useradd -m -u 1000 user
19
+
20
+ # Set home to the user's home directory
21
+ ENV HOME=/home/user \
22
+ PATH=/home/user/.local/bin:$PATH
23
+
24
+ # Set the working directory to the user's home directory
25
+ WORKDIR $HOME/app
26
+
27
+ # Switch to the new user (user ID 1000)
28
+ USER user
29
+
30
  RUN \
31
  echo "**** install packages ****" && \
32
  apk --no-cache add \
 
54
  rm -rf \
55
  /tmp/*
56
 
57
+ # add local files with proper ownership
58
+ COPY --chown=user ./root/ /
59
 
60
  # ports and volumes
61
  VOLUME /config
62
 
63
+ EXPOSE 9117