francescou / docker-compose-ui

web interface for Docker Compose
http://francescou.github.io/docker-compose-ui
MIT License
1.54k stars 228 forks source link

setup remote host #5

Closed ymote closed 8 years ago

ymote commented 9 years ago

Hi,

The remote host using HTTPS. Is there any way to specify the certification path to make HTTPS work? The UI does not have the options. Thanks.

Yue

francescou commented 9 years ago

Hi Yue,

in order to set an HTTPS remote docker host I think you have to add two environment properties: DOCKER_CERT_PATH and DOCKER_TLS_VERIFY

e.g.

docker run \
    --name docker-compose-ui \
    -p 5000:5000 \
    -v /home/user/docker-compose-ui/demo-projects:/opt/docker-compose-projects:ro \
    -e DOCKER_HOST=remote-docker-host:2375 \
    -e DOCKER_TLS_VERIFY=1 \
    -e DOCKER_CERT_PATH=/home/user/docker-cert \
    francescou/docker-compose-ui

you can find additional info on the docker-compose repository: docs and docker_client.py

francescou commented 9 years ago

Hi Yue,

did you manage to solve the issue?

ymote commented 9 years ago

Here is my script which can run successfully. Please note that it is necessary to map the HTTPS certificate path to container volume and set DOCKER_CERT_PATH to the container's cert path.

docker run \
    --name docker-compose-ui \
    -p 5000:5000 \
    -v /home/user/docker-compose-ui/demo-projects:/opt/docker-compose-projects:ro \
    -v /Users/abcd/.docker/machine/machines/default:/opt/cert:ro \
    -e DOCKER_HOST=https://192.168.99.102:2376 \
    -e DOCKER_TLS_VERIFY=1 \
    -e DOCKER_CERT_PATH=/opt/cert \
    francescou/docker-compose-ui
francescou commented 9 years ago

Thank you for the clarification. I will close the issue, feel free to reopen if necessary.

/cc @dvdred

ghost commented 8 years ago

Hi all

What if I have swarm, but I'm not using TLS? What if I already have a swarm where I want compose-ui to live and lead? This is what I'm trying to run, which start the ui but does not build things

docker -H tcp://172.17.7.11:4000 run \ -dit \ --name docker-compose-ui \ -p 5000:5000 \ -e DOCKER_HOST=http://172.17.7.11:4000 \ francescou/docker-compose-ui`

dvdred commented 8 years ago

Hello, I have a working compose-ui running on a Swarm Cluster without TLS. Scaling in the Swarm with the UI is very cool! This is my setup:

CLUSTER_IP=Insert the cluster ip
CLUSTER_PORT=Insert the cluster port
docker run --name composeui -p 5000:5000  \
-v "/opt/docker-compose-projects:/opt/docker-compose-projects:ro" \
-w "/opt/docker-compose-projects" \
-e DOCKER_HOST=$CLUSTER_IP:$CLUSTER_PORT \
francescou/docker-compose-ui -d

Probably this is not the better way to run it, but i hope this can help you.

francescou commented 8 years ago

Thanks @dvdred ! @wido-gg did you solve the issue following his guidelines?

ghost commented 8 years ago

I'm not sure I have.

For one side, I can connect to the swarm. The thing is, when I send commands to do the build, or a pull, the docker engines that are part of the swarm start to download the images but after that nothing happens.

I'll try to collect some logs. Let me know if you want to follow up here or in a new ticket. Thanks!

El sáb., 9 de abr. de 2016 a la(s) 05:00, Francesco Uliana < notifications@github.com> escribió:

Thanks @dvdred https://github.com/dvdred ! @wido-gg https://github.com/wido-gg did you solve the issue following his guidelines?

— You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub https://github.com/francescou/docker-compose-ui/issues/5#issuecomment-207738939

Wido

dvdred commented 8 years ago

please @wido-gg, can you describe your setup with some more details? What happens when you do the "up" and what is the content of the docker-compose.yml?

francescou commented 8 years ago

I understand you can connect to swarm so I guess it would be better to open a new issue.

Collect some logs if you can and let's follow up in a new issue