Docker-compose: using with selinux

Viewed 2448

While working with docker on Centos and selinux to mount volume we have to use :z something like

docker run -ti -v /home/my-file.txt:/tmp/my-file.txt:z alpine sh

However how could we use same functionality via docker-compose

1 Answers

One way I found is to use

   flask:
        build: .
        container_name: flask
        volumes:
           - {src_folder}:/<target>:z
Related