Hi,
I am trying random tutorials on docker using Windows 10 and had success with none.
Now I basically wiped all images/containers and trying tutorial from https://docs.docker.com/compose/rails/ .
This is my Dockerfile:
FROM ruby:2.2.0
RUN apt-get update -qq && apt-get install -y build-essential libpq-dev
RUN mkdir /myapp
WORKDIR /myapp
ADD Gemfile /myapp/Gemfile
ADD Gemfile.lock /myapp/Gemfile.lock
RUN bundle install
ADD . /myapp
This is docker-compose.yml :
db:
image: postgres
web:
build: .
command: bundle exec rails s -p 3000 -b '0.0.0.0’
volumes:
- .:/myapp
ports:
- "3000:3000"
links:
- db
After running this command docker-compose run web rails new . --force --database=postgresql --skip-bundle
I receive error: Interactive mode is not yet supported on Windows.
Please pass the -d flag when using docker-compose run
.
When I modify it to docker-compose run web rails new . --force --database=postgresql --skip-bundle
then I receive another error
Building web
Traceback (most recent call last):
File “”, line 3, in
File “C:\projects\compose\compose\cli\main.py”, line 54, in main
File “C:\projects\compose\compose\cli\docopt_command.py”, line 23, in sys_dispatch
File “C:\projects\compose\compose\cli\docopt_command.py”, line 26, in dispatch
File “C:\projects\compose\compose\cli\main.py”, line 171, in perform_command
File “C:\projects\compose\compose\cli\main.py”, line 421, in run
File “C:\projects\compose\compose\cli\main.py”, line 625, in run_one_off_container
File “C:\projects\compose\compose\service.py”, line 288, in create_container
File “C:\projects\compose\compose\service.py”, line 311, in ensure_image_exists
File “C:\projects\compose\compose\service.py”, line 683, in build
File “c:\projects\compose\venv\lib\site-packages\docker\api\build.py”, line 41, in build
TypeError: You must specify a directory to build in path
docker-compose returned -1
Could anybody help? Or just docker on windows is like a russian roulette and I should rather go for mac/linux host?
Thank you