I'm not sure if there is anything I'm missing in my configuration. My rails app works on mac and not on windows. It is my understanding that it should just work. yes/no?
- Windows 10
Docker version 1.9.1, build a34a1d5
docker-compose version 1.5.2, build e5cf49d
- mac os x 10.5
Docker version 1.9.1, build a34a1d5
docker-compose version 1.5.2, build 7240ff3
Activity
web_1 | Could not locate Gemfile or .bundle/ directory
FROM ruby:2.2.3
MAINTAINER Dakota Lightning <[email protected]>
RUN apt-get update -qq && apt-get install -y build-essential nodejs libpq-dev
RUN mkdir -p /var/myapp
WORKDIR /var/myapp
COPY Gemfile /var/myapp/Gemfile
RUN bundle install
web:
build: .
volumes:
- '.:/var/myapp'
ports:
- "3000:3000"
links:
- db
command: bundle exec rails s -b '0.0.0.0'
db:
image: mysql
ports:
- "13306:3306"
environment:
MYSQL_ROOT_PASSWORD: root
Edit: I have tried docker-compose rm
I believe the problem is that you're using a host volume:
volumes:
- '.:/var/myapp'
On your OSX host, you must have the Gemfile or .bundle/ in the working directory.
On the windows app they are missing?
To confirm you can remove the volume and see if it works. If you have the same files on both hosts, could you include an ls
of the directory, and a docker inspect
of the container on both hosts?
Hey thanks for trying to help, I was able to figure it out.
docker-machine
It might have been related to not having the files in my /user/
dir
I moved the files after realizing i wasn't in the /user/
folder, I'm guessing it persisted where I had the old folder and wasn't able to mount the volume.
Most helpful comment
I believe the problem is that you're using a host volume:
On your OSX host, you must have the Gemfile or .bundle/ in the working directory.
On the windows app they are missing?
To confirm you can remove the volume and see if it works. If you have the same files on both hosts, could you include an
ls
of the directory, and adocker inspect
of the container on both hosts?