tim
November 2, 2016, 9:06am
1
Hi folks,
I’m having trouble to setup CI with my docker-compose based projects. This is my compose file for a test project :
version: "2"
services:
api:
build: .
command: "npm run demo"
environment:
- NODE_ENV=development
volumes:
- "${PWD}:/usr/src/app"
But it fails that npm cant find the package.json
because the volume under /usr/src/app
is missing. You can see the output here:
GitLab Community Edition
If I run this compose file localy on my computer it runs fine and outputs hello world
.
Any idea what could couse this?
Thanks for your time.
Tim
tim
November 28, 2016, 1:43pm
2
I solved this myself .
The reason was very simple: I had to specify the paths on the docker host and not inside of the docker container which was starting the docker container. In the end it is dockerd which starts the container and has to provide the paths.
2 Likes
Hi Tim,
We’ve got exact the same problem! How exactly did you fix it?
We’ve worked hours long to fix this problem, but we cannot figure it out!
Any ideas? Please contact us!
tim
January 11, 2017, 12:55pm
4
Hi Cees,
ceesvanegmond:
We’ve got exact the same problem! How exactly did you fix it?We’ve worked hours long to fix this problem, but we cannot figure it out!
Any ideas? Please contact us!
Depends on your Problem, my got solved via the configuration file of the runner:
concurrent = 1
check_interval = 0
[[runners]]
name = ""
url = ""
token = ""
executor = "docker"
[runners.docker]
tls_verify = false
image = "gitlab/dind:latest"
privileged = true
disable_cache = false
volumes = ["/cache", "/var/run/docker.sock:/var/run/docker.sock:rw", "/builds:/builds:rw"]
[runners.cache]
1 Like
Ah dude, awesome! It works!
1 Like
How did you change the volumes? Directly in the .toml file?