Docker compose volume size

I am using Docker version 20.10.17, build 100c701, on Ubuntu 20.04.4.
I have successfully created a jenkins/jenkins:lts image with its own volume, using the following command:
docker run -p 8082:8080 -p 50001:50000 -d -v jenkins_home:/var/jenkins_home jenkins/jenkins:lts

But after installing many plugins and running many jobs on Jenkins, I kept getting a notification on the Jenkins GUI that the storage is almost full (it was almost 388 Mb).

1- What is the default size of a docker volume ? I couldn’t find an answer anywhere.

2- I tried to specify the size of the volume (after deleting everything image/container/volume) using the driver_opts and using a docker compose file.

The docker-compose.yml file.

version: '3'
      context: .
      dockerfile: ./Dockerfile
      - /var/run/docker.sock:/var/run/docker.sock
      - jenkins_home:/var/jenkins_home
      - 8082:8080
      - 50001:50000

      o: "size=900m" 

The Dockerfile.

FROM jenkins/jenkins:lts
USER root
RUN apt-get -y update && apt-get install -y lsb-release &&\
    apt-get -y install apt-transport-https ca-certificates
RUN apt-get -y install curl && \
    apt-get -y update && \
    apt-get -y install python3.10 
RUN curl -fsSLo /usr/share/keyrings/docker-archive-keyring.asc \
    https: //
RUN echo "deb [arch=$(dpkg --print-architecture) \
    signed-by=/usr/share/keyrings/docker-archive-keyring.asc] \
    https :// \
    $(lsb_release -cs) stable" > /etc/apt/sources.list.d/docker.list
RUN apt-get -y update && \
    apt-get -y install docker-ce docker-ce-cli docker-compose-plugin
USER jenkins

I got an error that the required device option is not specified.
I don’t want a temporary storage tmpfs, so i tried to specify a path on my machine. I got the error that there is no such device.
What am I doing wrong? How should I proceed?
My final target is to create a Jenkins container that has a large volume size.

Afaik that option is only available for volumes backed by block level devices, e.g. for zfs, btrfs and devicemapper - or if you install a specific storage plugin which supports it, like portworx.

A named volume will store its data in $(docker info --format '{{.DockerRootDir}}')/volumes/{volume name}/_data, which is just a folder on your hosts system - docker mounts this path into the container path you specified as target. In case of a named volume backed by a remote fileshare, the folder will be the mountpoint for the remote fileshare.

The named volume can potentialy occupy all available space from the filesystem where docker info --format '{{.DockerRootDir}}' is mounted.

Recommendation: check the size of the filesystem and either expand it or move the docker root dir to a filesystem that has enough capacity - make sure the target location uses the same filesystem as your current filesystem uses, if you want to retain your images and containers.