Mount executable using docker provider


I would like to mount a shell script into a container. The mount itself is functional, but for some reason it’s not executable.
My task configuration looks like this:

        task "traefik" {
            driver = "docker"

            config {
                image = "traefik:[[.traefik.version]]"
                ports = ["http", "https", "admin", "dns"]
                args = [...]
                network_mode = "host"
                volumes = [

            template {
                data = <<EOH
                destination = "secrets/"
                perms = "755"

When trying to execute the script, I receive a permission denied error:

/ # ./
ash: ./ Permission denied

Copying the file and executing it afterwards works without any problems:

/ # ls -l
-rwxr-xr-x    1 root     root           807 Nov 14 21:08
-rwxr-xr-x    1 root     root           807 Nov 14 21:14

The copy ( is executable without errors.

Is there something wrong with the mount or is my approach completely wrong?
I couldn’t find any hints about it in the docker/nomad documentation/similar problems anywhere else.

I found the reason for this: the volume mount is a tmpfs mounted with the noexec flag… is there any way to change that behaviour?