Debug Ruby Bundler Initialization Process To Find Missing Files in Minified Docker Images

Cerrado Publicado hace 5 años Pagado a la entrega
Cerrado Pagado a la entrega

Need a Ruby and Bundler internals expert to find out why Bundler in minified Docker images can't find the bundled gems. Not implying that Bundler is broken. It works as designed. The details of its design and the failure conditions are not quite clear though :-) Looking for 'what', 'where' and 'why'. 'What' is the failure during the gem initialization process that prevents Ruby from loading the gem locations and information? 'Where' is this failure in the ruby gem initialization flow? 'Why' does this failure happen?

The minified images are created using the docker-slim tool ( [login to view URL] ).

Steps to reproduce the condition:

1. Install DockerSlim:

[login to view URL]

([login to view URL] for Mac OS X or [login to view URL] for Linux)

2. Create a Docker image for the sample Ruby app:

App code location - [login to view URL]

Create the image using the docker build command:

docker build -t my/ruby-app .

3. Minify the Docker image:

docker-slim build --http-probe my/ruby-app

Press enter when the tool prompts you.

Note the tool output… It will show you where the minification artifacts are stored:

docker-slim[build]: info=results artifacts.location=‘/.images//artifacts'

The ‘files’ subdirectory contains the files in the minified image (you can also get the files from the minified container image itself using the docker save command)

The bundled gems are in: /var/lib/gems/2.5.0/gems

4. Run the minified image:

docker run -it --rm --name="ruby_app" -p 7000:7000 my/[login to view URL]

Error message you will see from the container:

Could not find eventmachine-1.2.7 in any of the sources

You can repackage the 'minified' Docker image adding whatever instrumentation you need. The artifacts location (<path_to_your_install_dir>/.images/<hash_string>/artifacts) also contains the Dockerfile used to build the 'minified' images, so you can create a new one by hand.

Docker Linux Ruby Ubuntu

Nº del proyecto: #18562331

Sobre el proyecto

7 propuestas Proyecto remoto Activo hace 5 años

7 freelancers están ofertando un promedio de $188 por este trabajo

LinuxGun

Hello, i will do Debug Ruby Bundler Initialization Process To Find Missing Files in Minified Docker Images I'm interested in your project. Please send me a message so that we can discuss more. Thanks & Regards, Más

$100 USD en 0 días
(9 comentarios)
4.1
dmirx

I think the problem is that during load, Ruby checks if directory "/usr/lib/ruby/vendor_ruby/2.5.0" exists. This directory is present at the original docker image, but is missing at a slim one. According to strace l Más

$111 USD en 2 días
(1 comentario)
2.0
rajanthakor08

I have read your requirement and understood that you like to hire Skilled Ruby on rails developer to To Find Missing Files in Minified Docker Images. We have 6+ years experience developer in Ruby on rails and we hav Más

$216 USD en 10 días
(0 comentarios)
0.0