Hello,
I setup up tigrisfs locally, and now I’m trying to set it up in a docker container on Render. However, I’m running into issues. I managed to get as far as here with a dockerfile and start.sh:
FROM python:3.11-slim-bookworm
WORKDIR /app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
RUN playwright install-deps
RUN playwright install
RUN apt-get update && \
apt-get install -y automake autotools-dev g++ git libcurl4-gnutls-dev libfuse-dev && \
apt-get install -y wget tar curl jq rclone s3fs mailcap fuse3 gvfs-fuse && \
wget https://github.com/tigrisdata/tigrisfs/releases/download/v1.2.1/tigrisfs_1.2.1_linux_amd64.tar.gz -O /app/tigrisfs.tar.gz && \
tar -xzf /app/tigrisfs.tar.gz && \
apt-get clean
COPY . .
RUN mkdir -p /app/vol
#RUN /app/tigrisfs test /app/vol
RUN ls -lA /app # C
RUN chmod +x /app/start.sh
RUN chmod +x /app/tigrisfs
#ENTRYPOINT ["/app/tigrisfs"]
ENTRYPOINT ["/app/start.sh"]
#CMD ["timeout", "15m", "python3", "app.py"]
CMD ["test", "/app/vol"]
#!/bin/bash
# 1. Check if the mount directory exists and is a directory
if [ ! -d "$2" ]; then
echo "Mount directory $2 does not exist."
exit 1
fi
# 2. Start TigrisFS mount in the BACKGROUND (&)
# This uses the arguments passed to the script: $1 (bucket) and $2 (mount point)
echo "Starting TigrisFS mount for $1 at $2..."
/app/tigrisfs --debug --debug_fuse --debug_s3 "$1" "$2" &
# 4. Wait for the mount to stabilize (Optional but safer for FUSE)
sleep 5
ls
df -h
# 5. Start your main Python application in the FOREGROUND
# This command will block, keeping the container running.
echo "Mount established. Starting Python script..."
python /app/app.py
# 7. Exit with the Python script's exit code
exit $?
However, my bucket is still not mounting as seen by the output of df -h, and in app.py where I try to read in a text file and print its contents. Does anyone know what I’m missing to make this work?