slimtoolkit / slimtoolkit/slim
Ruby app CMD cannot find bundler
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 23.4k
- Forks
- 840
- PR merge metrics
- No merged PRs in 30d
Description
I have a Ruby app based on ruby:2.5.3-alpine with a CMD that cannot find bundler.
It's being built as:
docker-slim build --http-probe --include-shell --include-exe sleep --include-exe grep --include-exe jq --include-exe /usr/local/bin/bundle myapp
CMD:
CMD ["./scripts/server.sh"]
server.sh:
#!/bin/sh
# Starting puma server
bundle exec puma -C config/puma.rb
I'm not sure if --include-exe pointing to bundler's absolute path is correct. I also tried --include-bin without success.
When running docker-compose pointing to my-app.slim, it raises the following error:
my-app | ./scripts/server.sh: line 4: bundle: not found
Client: Docker Engine - Community
Version: 19.03.4
API version: 1.40
Go version: go1.12.10
Git commit: 9013bf5
Built: Thu Oct 17 23:44:48 2019
OS/Arch: darwin/amd64
Experimental: false
Let me know if you have any idea. Thanks in advance!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the docker-slim build command and running the resulting my-app.slim image with the shown CMD. Inspect ./scripts/server.sh and the Ruby image's Bundler setup, then compare the slim image with the original container. Done means the server script can resolve bundle and launch Puma in the slim image.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, docker-compose, ruby
- Domain
- devops, infrastructure, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100