# Non-existing path

**URL:** <https://discuss.circleci.com/t/non-existing-path/16320>\
**Category:** Build Environment\
**Created:** [September 7, 2017, 3:42pm UTC](https://discuss.circleci.com/t/non-existing-path/16320 "2017-09-07T15:42:47Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jazzman](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@jazzman](https://discuss.circleci.com/u/jazzman)\
**Post date:** [September 7, 2017, 3:42pm UTC](https://discuss.circleci.com/t/non-existing-path/16320/1 "2017-09-07T15:42:47Z")

</div>

I get the following error when I try to run:

`docker-compose run myapp test`

```
Cannot start service myapp: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused \"rootfs_linux.go:54: mounting \\\"/root/myapp/server.js\\\" to rootfs \\\"/var/lib/docker/aufs/mnt/e0b55b8142ca8df218caa096e6e8a75e91df78ca0ff9d0e416fe9aabb613e012\\\" at \\\"/var/lib/docker/aufs/mnt/e0b55b8142ca8df218caa096e6e8a75e91df78ca0ff9d0e416fe9aabb613e012/opt/myapp/server.js\\\" caused \\\"not a directory\\\"\""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

```

**circle.yml:**  
version: 2.0  
jobs:  
build:  
working\_directory: ~/myapp  
docker:  
- image: node:7.10.0  
- image: circleci/postgres:9.6-alpine  
- image: docker:17.05.0-ce-git  
steps:  
- checkout  
- setup\_remote\_docker  
- run: apt-get update  
- run: apt-get install sudo  
- run: apt-get install curl  
- run:  
name: Install Docker Compose  
command: |  
set -x  
curl -L [https://github.com/docker/compose/releases/download/1.11.2/docker-compose-](https://github.com/docker/compose/releases/download/1.11.2/docker-compose-)`uname -s`-`uname -m` \> ~/docker-compose  
chmod +x ~/docker-compose  
sudo mv ~/docker-compose /usr/local/bin/docker-compose  
- run: docker-compose build  
- run: docker-compose run --rm myapp test

**docker-compose.yml**  
version: "2.1"  
services:  
myapp:  
build: .  
stdin\_open: true  
tty: true  
command: watch  
entrypoint: make  
ports:  
- "80:3000"  
volumes:  
- ./server.js:/opt/myapp/server.js  
- ./src/:/opt/myapp/src/  
- ./api/src/:/opt/myapp/api/src/  
- ./api/schema/:/opt/myapp/api/schema/  
- ./api/test/:/opt/myapp/api/test/  
depends\_on:  
- postgres  
environment:  
DATABASE\_CLIENT: pg  
DATABASE\_URL: progres://myapp:test@postgres:5432/myapp  
JWT\_SECRET: fweafseag  
postgres:  
image: postgres:9.6  
ports:  
- "5432:5432"  
volumes:  
- postgres\_data:/var/lib/postgresql/data  
environment:  
POSTGRES\_USER: myapp  
POSTGRES\_PASSWORD: test  
volumes:  
postgres\_data:

**What is failing is the command “docker-compose run --rm myapp test”**

Any ideas to why? Thanks!

---

<div class="post-metadata">

**Author:** ![WouterSioen](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/woutersioen/32/17690_2.png) [@WouterSioen](https://discuss.circleci.com/u/WouterSioen)\
**Post date:** [January 19, 2018, 11:54am UTC](https://discuss.circleci.com/t/non-existing-path/16320/2 "2018-01-19T11:54:40Z")

</div>

Did you eventually find out what caused the issue? I’m having the same problem.

---

<div class="post-metadata">

**Author:** ![halfer](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/halfer/32/9083_2.png) [@halfer](https://discuss.circleci.com/u/halfer)\
**Post date:** [January 20, 2018, 12:06am UTC](https://discuss.circleci.com/t/non-existing-path/16320/3 "2018-01-20T00:06:49Z")

</div>

I’ve not had this problem with Docker, but have you checked your volumes? The error strikes me as being quite clear:

> Are you trying to mount a directory onto a file (or vice-versa)?

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/circleci/original/3X/5/1/511608acda8e85906e15909b57bd0a46c1dbe291.png) [@system](https://discuss.circleci.com/u/system)\
**Post date:** [June 18, 2018, 11:32am UTC](https://discuss.circleci.com/t/non-existing-path/16320/4 "2018-06-18T11:32:44Z")

</div>


