Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker build failure on windows with docker #66

Open
petre-enciu opened this issue Mar 25, 2024 · 1 comment
Open

Docker build failure on windows with docker #66

petre-enciu opened this issue Mar 25, 2024 · 1 comment
Labels
bug 🐛 Something isn't working

Comments

@petre-enciu
Copy link

I tried to build the project with docker compose for windows, following the steps described in the README file.
First, there is a problem with some files:

  1. README file: git clone https://github.com/consul/consul.git. it should be git clone https://github.com/code4romania/consul.git
  2. docker-compose.yml - there is no ports binding for the database service. ports statement should be added, ex:
    ports:
    • "5432:5432"

At the build phase:

  1. docker-compose build
    gives this error:
    **_=> ERROR [app 13/16] RUN gem install bundler 28.4s

[app 13/16] RUN gem install bundler:
28.03 ERROR: Error installing bundler:
28.03 The last version of bundler (>= 0) to support your Ruby & RubyGems was 2.4.22. Try installing it with gem install bundler -v 2.4.22
28.03 bundler requires Ruby version >= 3.0.0. The current ruby version is 2.6.7.197.


failed to solve: process "/bin/sh -c gem install bundler" did not complete successfully: exit code: 1_**

As workaround, I have manually added the bundler version in Dockerfile (line 38):
RUN gem install bundler -v 2.4.22
The build works as it should.

  1. docker-compose up
    gives this error:
    [+] Running 15/1
    ✔ database 14 layers [⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿] 0B/0B Pulled 27.8s
    [+] Running 3/3
    ✔ Network consul_default Created 0.3s
    ✔ Container consul-database-1 Created 2.3s
    ✔ Container consul-app-1 Created 0.4s
    Attaching to app-1, database-1
    database-1 |
    database-1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
    database-1 |
    database-1 | LOG: database system was shut down at 2024-03-25 15:53:43 UTC
    database-1 | LOG: MultiXact member wraparound protections are now enabled
    database-1 | LOG: database system is ready to accept connections
    database-1 | LOG: autovacuum launcher started
    app-1 | /bin/sh: 0: Illegal option -
    app-1 exited with code 2

In docker-desktop the database container is running, but the container associated with the rails server is always down and cannot be stared.

Please Help!

image

@petre-enciu petre-enciu added the bug 🐛 Something isn't working label Mar 25, 2024
@javierm
Copy link

javierm commented Mar 25, 2024

Just for your interest, in the original Consul Democracy repository, this line has been removed because it isn't necessary with Ruby 2.6 and later: consuldemocracy@f087d6f1ea.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants