-
FROM python:3.9.17: Sets the base image to Python 3.9.17.
-
ENV LANG C.UTF-8: Sets the language environment variable to UTF-8.
-
USER root: Switches to the root user.
-
ARG HOME=/root: Defines the default home directory as /root.
-
ENV DEBIAN_FRONTEND=noninteractive: Sets a non-interactive frontend for package installation.
-
RUN apt update \: Updates the package index.
-
&& apt install --assume-yes \: Installs the following packages: gcc, ffmpeg, libsm6, libxext6, git, curl.
-
ARG RCLONE_INCLUDE="no": Defines an argument RCLONE_INCLUDE with a default value of "no".
-
ENV RCLONE_INCLUDE=${RCLONE_INCLUDE}: Sets an environment variable RCLONE_INCLUDE with the value of the RCLONE_INCLUDE argument.
-
ARG RCLONE_VERSION="1.55.1": Defines an argument RCLONE_VERSION with a default value of "1.55.1".
-
ENV RCLONE_VERSION=${RCLONE_VERSION}: Sets an environment variable RCLONE_VERSION with the value of the RCLONE_VERSION argument.
-
RUN [ "${RCLONE_INCLUDE}" != "yes" ] \: Checks if the RCLONE_INCLUDE variable is set to "yes".
-
|| ( \: If RCLONE_INCLUDE is not set to "yes", it starts a new command block.
-
curl -Of https://downloads.rclone.org/v${RCLONE_VERSION}/rclone-v${RCLONE_VERSION}-linux-amd64.zip \: Downloads the specified version of the rclone software.
-
&& unzip -a "rclone-v${RCLONE_VERSION}-linux-amd64.zip" \: Unzips the downloaded file.
-
&& cp "rclone-v${RCLONE_VERSION}-linux-amd64/rclone" /usr/bin/rclone.new \: Copies the rclone binary to /usr/bin/rclone.new.
-
&& chmod 755 /usr/bin/rclone.new \: Changes the permissions of the rclone binary.
-
&& chown root:root /usr/bin/rclone.new \: Changes the ownership of the rclone binary to root.
-
&& mv /usr/bin/rclone.new /usr/bin/rclone \: Renames the rclone binary from /usr/bin/rclone.new to /usr/bin/rclone.
-
&& rm -r "rclone-v${RCLONE_VERSION}-linux-amd64" \: Removes the directory containing the extracted rclone files.
-
): Closes the command block started at step 13.
-
ENTRYPOINT [ "bash", "bootstrap/bin", "poetry", "run", "python", "-m", "app.main" ]: Specifies the command that will be executed when a container is started from the image. It runs the app.main module of the Python application using Poetry as the package manager.