Skip to content

Docker build failure due to bundler flags #2635

Description

@hugginsio

Bug report

The Docker image fails to build using the docker build -t devdocs . command, perhaps due to Bundler flags:

[+] Building 1.5s (9/11)                                                                                                                                    docker:orbstack
 => [internal] load build definition from Dockerfile                                                                                                                   0.0s
 => => transferring dockerfile: 529B                                                                                                                                   0.0s
 => [internal] load metadata for docker.io/library/ruby:3.4.7                                                                                                          1.1s
 => [internal] load .dockerignore                                                                                                                                      0.0s
 => => transferring context: 104B                                                                                                                                      0.0s
 => [1/7] FROM docker.io/library/ruby:3.4.7@sha256:779ca68b84fe3804e27f5b7ea5ab001005c708b7236a798c15b860d71cba9d21                                                    0.0s
 => [internal] load build context                                                                                                                                      0.1s
 => => transferring context: 118.44kB                                                                                                                                  0.1s
 => CACHED [2/7] WORKDIR /devdocs                                                                                                                                      0.0s
 => CACHED [3/7] RUN apt-get update &&     apt-get -y install git nodejs libcurl4 &&     gem install bundler &&     rm -rf /var/lib/apt/lists/*                        0.0s
 => CACHED [4/7] COPY Gemfile Gemfile.lock Rakefile /devdocs/                                                                                                          0.0s
 => ERROR [5/7] RUN bundle install --system &&     rm -rf ~/.gem /root/.bundle/cache /usr/local/bundle/cache                                                           0.3s
------
 > [5/7] RUN bundle install --system &&     rm -rf ~/.gem /root/.bundle/cache /usr/local/bundle/cache:
0.224 The `--system` flag has been removed because it relied on being remembered
0.224 across bundler invocations, which bundler no longer does. Instead please use
0.224 `bundle config set path.system true`, and stop using this flag
------

 1 warning found (use docker --debug to expand):
 - JSONArgsRecommended: JSON arguments recommended for CMD to prevent unintended behavior related to OS signals (line 24)
Dockerfile:14
--------------------
  13 |
  14 | >>> RUN bundle install --system && \
  15 | >>>     rm -rf ~/.gem /root/.bundle/cache /usr/local/bundle/cache
  16 |
--------------------
ERROR: failed to build: failed to solve: process "/bin/sh -c bundle install --system &&     rm -rf ~/.gem /root/.bundle/cache /usr/local/bundle/cache" did not complete successfully: exit code: 15

OS information

macOS Version 26.1 (25B78), Orbstack Version 2.0.5 (19905)

Steps to reproduce

To quote the README:

git clone https://github.com/freeCodeCamp/devdocs.git && cd devdocs
docker build -t devdocs .
docker run --name devdocs -d -p 9292:9292 devdocs

More resources

NA

Possible fix

I will attempt updating the usage of this flag and then open a PR.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions