[SOLVED] ERROR: for httpd oci runtime error: rootfs_linux.go:53: mounting "..." to rootfs "..." caused "not a directory"

Expected behavior

Folders with files should mount

Actual behavior

Only Folders seems mounted

Information

  • the output of:

    • Moby Menu > Diagnose & Feedback on OSX

    Docker for Mac: version: mac-v1.12.0-beta17
    OS X: version 10.11.5 (build: 15F34)
    logs: /tmp/20160706-122333.tar.gz
    [OK] docker-cli
    [OK] app
    [OK] menubar
    [OK] virtualization
    [OK] system
    [OK] osxfs
    [OK] db
    [OK] slirp
    [OK] moby-console
    [OK] logs
    [OK] vmnetd
    [OK] env
    [OK] moby
    [OK] driver.amd64-linux

  • a reproducible case if this is a bug, Dockerfiles FTW

  • host distribution and version ( OSX 10.11.5 )

my docker compose yml : docker-composer.yml

version: "2"
services:

httpd:
    image: httpd
    volumes:
      - ./conf/httpd/conf/httpd.conf:/usr/local/apache2/conf/httpd.conf

NB: for the file httpd.conf you can use a classic httpd.conf from apache

Steps to reproduce the behavior

> docker-compose up --build
Removing testdev_httpd_1
Recreating d384cd561d5e_http

ERROR: for httpd  oci runtime error: rootfs_linux.go:53: mounting "/var/lib/docker/aufs/mnt/5a4e7d991779d60b3f91c82eb79f99e3f012eddfb06c796e77c60016f6afda3f/usr/local/apache2/conf/httpd.conf" to rootfs "/var/lib/docker/aufs/mnt/5a4e7d991779d60b3f91c82eb79f99e3f012eddfb06c796e77c60016f6afda3f" caused "not a directory"
ERROR: Encountered errors while bringing up the project.

Hello,

I found the cause of the problem thanks for the update of the beta to dock mac deploy this Wednesday, July 6, 2016

> docker-compose up
Removing testdev_httpd_1
Recreating d384cd561d5e_d384cd561d5e_d384cd561d5e_http

ERROR: for httpd  Mounts denied: 
The path /Applications/MAMP/htdocs/test.dev/conf/httpd/conf/httpd.conf
is not shared from OS X and does not belong to the system.
You can configure shared paths from Docker -> Preferences...
.
ERROR: Encountered errors while bringing up the project.

The solution is added the path /Applications/MAMP and its works :slight_smile:

Hello,
I am facing the same issue here on Ubuntu 16.04 and I didn’t get the solution you expose.
Is the path /Applications/MAMP from where?

Hello Rafael,

You need to add the directory of your mamp in the file sharing of docker to allow the mounting :slight_smile:

See the screenshot :

Kind regards,
Lbe

1 Like