'docker-compose.yml unable to start ruby app with custom configuration
I have a small rack application that im configuring a development environment for, using docker-compose.yml
The application will be mounted to an image, without docker it runs just fine using bundle exec rackup -p 3030
the idea for this configuration comes from this article for a node app, but im running into some snags when porting it over to ruby
Makefile
install:
docker-compose -f docker-compose.builder.yml run --rm install
run:
docker-compose up
docker-compose.builder.yml
version: '2'
services:
base:
image: ruby:3.0.3
volumes:
- .:/usr/src/service/
working_dir: /usr/src/service/
install:
extends:
service: base
command: bash -c "bundle config set --local path './.vendor' && bundle install"
docker-compose.yml
version: '3'
services:
dev:
image: ruby:3.0.3
volumes:
- .:/usr/src/service
working_dir: /usr/src/service
command: /usr/local/bin/bundle exec ./.vendor/ruby/3.0.0/bin/rackup -p 3030
ports:
- 3030:3030
my install script seems to work just fine
$ make install
docker-compose -f docker-compose.builder.yml run --rm install
WARNING: Found orphan containers (backbone_dev_1) for this project. If you removed or renamed this service in your compose file, you can run this command with the --remove-orphans flag to clean it up.
Creating backbone_install_run ... done
...
Bundle complete! 18 Gemfile dependencies, 64 gems now installed.
Bundled gems are installed into `./.vendor`
my issue seems to be with my script to run my app
$ make run
docker-compose up
Starting backbone_dev_1 ... done
Attaching to backbone_dev_1
dev_1 | /usr/bin/env: ‘ruby_executable_hooks’: No such file or directory
backbone_dev_1 exited with code 127
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
