Skip to content

tmpfs-size in docker-compose #5372

@adililhan

Description

@adililhan

Hi there,

my docker-compose.yml is like this:

version: "3"                                                                                                                                                                                                       
                                                                                                                                                                                                                   
services:                                                                                                                                                                                                          
    myservice:                                                                                                                                                                                                        
        build: ./mycode                                                                                                                                                                                               
        volumes:                                                                                                                                                                                                   
            - ./logs:/data/log                                                                                                                                                                                     
        ports:                                                                                                                                                                                                     
            - "80:80"                                                                                                                                                                                              
        tmpfs:                                                                                                                                                                                                     
            - /exampledir

that works. i'd like to specify the tmpfs size. There is a parameter in the Engine that is called as tmpfs-size *

I just had a look into the Docker Compose's instruction **. I didn't see such as parameter.

How can i set the tmpfs size through through the docker-compose.yml file? Is there a way to do it?

*: https://docs.docker.com/engine/admin/volumes/tmpfs/#specify-tmpfs-options
**: https://docs.docker.com/compose/compose-file/#tmpfs

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions