Update Dockerfile
Browse files- Dockerfile +12 -21
Dockerfile
CHANGED
|
@@ -14,27 +14,22 @@ ENV XDG_DATA_HOME="/config" \
|
|
| 14 |
XDG_CONFIG_HOME="/config" \
|
| 15 |
TMPDIR=/run/jackett-temp
|
| 16 |
|
| 17 |
-
#
|
| 18 |
USER root
|
| 19 |
|
|
|
|
| 20 |
RUN \
|
| 21 |
echo "**** install packages ****" && \
|
| 22 |
apk --no-cache add \
|
| 23 |
icu-data-full \
|
| 24 |
icu-libs && \
|
| 25 |
echo "**** install jackett ****" && \
|
| 26 |
-
mkdir -p \
|
| 27 |
-
/app/Jackett && \
|
| 28 |
if [ -z ${JACKETT_RELEASE+x} ]; then \
|
| 29 |
-
JACKETT_RELEASE=$(curl -sX GET "https://api.github.com/repos/Jackett/Jackett/releases/latest" \
|
| 30 |
-
| jq -r .tag_name); \
|
| 31 |
fi && \
|
| 32 |
-
curl -o \
|
| 33 |
-
|
| 34 |
-
"https://github.com/Jackett/Jackett/releases/download/${JACKETT_RELEASE}/Jackett.Binaries.LinuxMuslAMDx64.tar.gz" && \
|
| 35 |
-
tar xf \
|
| 36 |
-
/tmp/jacket.tar.gz -C \
|
| 37 |
-
/app/Jackett --strip-components=1 && \
|
| 38 |
echo "**** fix for host id mapping error ****" && \
|
| 39 |
chown -R root:root /app/Jackett && \
|
| 40 |
echo "**** save docker image version ****" && \
|
|
@@ -43,18 +38,14 @@ RUN \
|
|
| 43 |
echo "**** cleanup ****" && \
|
| 44 |
rm -rf /tmp/*
|
| 45 |
|
| 46 |
-
#
|
| 47 |
-
|
| 48 |
-
# Switch to non-root user for normal operations
|
| 49 |
-
USER user
|
| 50 |
-
|
| 51 |
-
# Create the /root directory within the container (if needed by the application)
|
| 52 |
RUN mkdir -p /root
|
| 53 |
|
| 54 |
-
#
|
| 55 |
VOLUME /config
|
| 56 |
-
|
| 57 |
EXPOSE 9117
|
| 58 |
|
| 59 |
-
#
|
| 60 |
-
|
|
|
|
|
|
|
|
|
| 14 |
XDG_CONFIG_HOME="/config" \
|
| 15 |
TMPDIR=/run/jackett-temp
|
| 16 |
|
| 17 |
+
# Use root for all operations
|
| 18 |
USER root
|
| 19 |
|
| 20 |
+
# Install necessary packages and Jackett
|
| 21 |
RUN \
|
| 22 |
echo "**** install packages ****" && \
|
| 23 |
apk --no-cache add \
|
| 24 |
icu-data-full \
|
| 25 |
icu-libs && \
|
| 26 |
echo "**** install jackett ****" && \
|
| 27 |
+
mkdir -p /app/Jackett && \
|
|
|
|
| 28 |
if [ -z ${JACKETT_RELEASE+x} ]; then \
|
| 29 |
+
JACKETT_RELEASE=$(curl -sX GET "https://api.github.com/repos/Jackett/Jackett/releases/latest" | jq -r .tag_name); \
|
|
|
|
| 30 |
fi && \
|
| 31 |
+
curl -o /tmp/jacket.tar.gz -L "https://github.com/Jackett/Jackett/releases/download/${JACKETT_RELEASE}/Jackett.Binaries.LinuxMuslAMDx64.tar.gz" && \
|
| 32 |
+
tar xf /tmp/jacket.tar.gz -C /app/Jackett --strip-components=1 && \
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
echo "**** fix for host id mapping error ****" && \
|
| 34 |
chown -R root:root /app/Jackett && \
|
| 35 |
echo "**** save docker image version ****" && \
|
|
|
|
| 38 |
echo "**** cleanup ****" && \
|
| 39 |
rm -rf /tmp/*
|
| 40 |
|
| 41 |
+
# Create /root directory (if needed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
RUN mkdir -p /root
|
| 43 |
|
| 44 |
+
# Expose the necessary ports and volumes
|
| 45 |
VOLUME /config
|
|
|
|
| 46 |
EXPOSE 9117
|
| 47 |
|
| 48 |
+
# Copy local files to the image
|
| 49 |
+
COPY root/ /
|
| 50 |
+
|
| 51 |
+
# Set the entrypoint or command (if applicable)
|