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 Example Request #4

Open
sirchuck opened this issue Apr 20, 2020 · 7 comments
Open

Docker Example Request #4

sirchuck opened this issue Apr 20, 2020 · 7 comments

Comments

@sirchuck
Copy link

I tried running this command:
docker-compose up

I got an error load_config() got an unexpected keyword argument 'config_dict'

Also, should I run rake db:setup before or after calling docker-compose up?

Thanks.

@sirchuck
Copy link
Author

I tried running rake db:setup and got:

The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run 'bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java'.
rake aborted!
TypeError: no implicit conversion of String into Integer

Should I run the bundle lock command offered?

Thanks again.

@sirchuck
Copy link
Author

Apparently the tzinfo-data is more of a warning than an error, just letting me know about windows platform installers.

I am still having trouble locating this TypeError (no implicit String to Integer) while running
rake db:setup

@sirchuck
Copy link
Author

Apparently Rake has an issue loading
require 'bootsnap/setup'

I assume it's a gem. I'm using Ruby 2.7.1, im not sure what version the api is, I think 2.3.1, perhaps that is a conflict.

Or maybe I just need to install the gem manually.

@sirchuck
Copy link
Author

Putting my process to solve for others who may have a problem:
rvm install 2.3.1
rvm use 2.3.1
gem install bundler
bundle install
gem install rake -v "12.3.2"
rake db:setup

Databases successfully created, the next issue to tackle is getting docker to work.

@sirchuck
Copy link
Author

sirchuck commented Apr 25, 2020

Any idea of what version docker you are using?
I ran: pip install docker-compose
That gives me docker-compose version 1.25.5, build unkown
But when I run docker-compose up I continue to get errors.

File "/home/chuck/.local/bin/docker-compose", line 11, in
sys.exit(main())
...
File "/home/chuck/.local/lib/python2.7/site-packages/requests/packages/urllib3/util/timeout.py", line 127, in _validate_timeout
"int or float." % (name, value))
ValueError: Timeout value connect was Timeout(connect=60, read=60, total=None), but it must be an int or float.

@sirchuck
Copy link
Author

I think I narrowed down the proper versions, correct if wrong:
pip uninstall docker-py; pip uninstall docker; pip install docker
pip install docker-compose~=1.12.0
pip install docker~=2.1

The latest error is:
from docker.errors import APIError
ImportError: No module named docker.errors

@sirchuck
Copy link
Author

Hello @wioux,

I'm still having difficulty trying to get the proper docker versions so that I can install this api.

Could you do a screencap of the docker installs on your machine?
Command:
pip freeze

Output:
docker==2.1.0
docker-compose==1.12.0
docker-py==1.10.5
docker-pycreds==0.4.0
dockerpty==0.4.1

ruby -v
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-linux]

docker-compose up

WARNING: Dependency conflict: an older version of the 'docker-py' package may be polluting the namespace. If you're experiencing crashes, run the following command to remedy the issue:
pip uninstall docker-py; pip uninstall docker; pip install docker
Traceback (most recent call last):
File "/home/chuck/.local/bin/docker-compose", line 7, in
from compose.cli.main import main
File "/home/chuck/.local/lib/python2.7/site-packages/compose/cli/main.py", line 20, in
from ..bundle import get_image_digests
File "/home/chuck/.local/lib/python2.7/site-packages/compose/bundle.py", line 13, in
from .network import get_network_defs_for_service
File "/home/chuck/.local/lib/python2.7/site-packages/compose/network.py", line 7, in
from docker.types import IPAMConfig
ImportError: cannot import name IPAMConfig

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant