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

Setup steps unclear #125

Open
evbo opened this issue Aug 16, 2018 · 2 comments
Open

Setup steps unclear #125

evbo opened this issue Aug 16, 2018 · 2 comments

Comments

@evbo
Copy link

evbo commented Aug 16, 2018

I'm new to Docker, so forgive my ignorance, but I'm struggling to understand what these directions are telling me to do:

https://github.com/whisklabs/docker-it-scala#configuration

According to this #7 you simply need to set that environment variable for DOCKER_HOST and all unit tests should then run just fine, but on a fresh install of Docker for Lubuntu 16.04, it isn't immediately obvious what that value should be set to and the value specified in the readme didn't seem to work for me (i.e. unit tests were failing to connect to postgres).

Digging into this issue further, I eventually got the postgres scalaTests for this repo passing by first configuring systemd as follows:

I created a file: /etc/systemd/system/docker.service.d/docker.conf
in that file I put (in order to match the host specified in the readme):

[Service]
ExecStart=
ExecStart=/usr/bin/dockerd -H tcp://127.0.0.1:2375 -H unix:///var/run/docker.sock

I then ran:

systemctl daemon-reload
systemctl restart docker

I then exported the DOCKER_HOST to the docker daemon (dockerd) url I just configured:
DOCKER_HOST=tcp://127.0.0.1:2375

Now unit tests passed.

It was frustrating that I couldn't find a lot of official Docker documentation backing up my decisions. Is it common to have to configure the daemon host like I did? Should the readme for docker-it-scala maybe clarify some of the docker setup (maybe call it "prerequisites")?

@evbo
Copy link
Author

evbo commented Aug 16, 2018

another caveat that might be helpful for new users is letting them know that, if during debugging they force quit, they should manually stop and remove any docker containers left running or else the next time they try to run the unit test the port will already be in use by the last failed execution:

sudo docker ps
sudo docker stop [container id still running]
sudo docker rm [container id still running]

By the way, now that I've figured out the basics, I must say this is fantastic! Thank you!

@evbo
Copy link
Author

evbo commented Aug 29, 2018

I found the docs. It might just be sufficient referencing these steps:
https://docs.docker.com/install/linux/linux-postinstall/

and this is useful background too on the DOCKER_HOST env var: https://docs.docker.com/engine/reference/commandline/dockerd/

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