Comments (10)
Hi,
as in the other issue I'm sorry for answering so late!
Also this change seems to work perfectly, I didn't test it in all my use cases for lack of time but in the base ones works!
Thank you!
PS is there a way I can offer you a beer? maybe through a donation link. You were very helpful for me and my project and I'd like to say thank you in the proper way! ;)
from fluentdocker.
Hi @lorenzo93 , I've not tried this myself - however I know people have used remote docker on e.g. digital ocean etc. What they do is register the remote docker daemon as a docker-machine (see https://www.kevinkuszyk.com/2016/11/28/connect-your-docker-client-to-a-remote-docker-host/) and use the UseMachine()
and specify the machine name and the fluent API will look this up in the docker-machine registry and use it's URL and Certificates for communication. Please have a go and tell me if you had any success. Otherwise I'll have a go as well.
I will be adding a way to create a docker host with only url and cerificates (without register it to machine) in the fluent api later on (but that would not be an easier thing to use, just different).
Cheers,
Mario
from fluentdocker.
@lorenzo93 I have checked in, but not tested or released a remote ssh builder to have a fluent access to remote docker daemons using ssh. You still need to (as descibed in above tutorial link):
- ssh-keygen -t rsa
- ssh-copy-id {username}@{host}
- sudo nano /etc/sudoers (And add the following to the end of the file where {username} is your username on the remote machine: {username} ALL=(ALL) NOPASSWD:ALL)
- Make sure 2376 port is open on your firewall
Now you can ssh to the machine and communicate with the remote docker daemon. It is now possible to use
Hos().UseSsh("ip to remote daemon").Name("name-of-your-connection").Build();
Now you have a host that talk to the remote docker daemon. As I said, I haven't tried it yet (have to wait until the weekend to setup this test). If it succeeds I'll make a release this weekend.
Cheers,
Mario
from fluentdocker.
I'm sorry but maybe I misunderstand your first reply.
With current NuGet version (2.4.0) I couldn't find anywhere the UseMachine()
command.
Here there is an example of what I tried
new Ductus.FluentDocker.Builders.Builder().UseMachine() .DefineImage(ImageName).ReuseIfAlreadyExists() .FromFile(DockerfilePath) .Build();
from fluentdocker.
Yes, the 2.4.0 do not have the above builder. I need to test it first. Meanwhile you can if you want instantiate a dockerhost using only a name. This name must match a machine name where you have done the remote configuration. This host will then communicate with the remote docker daemon. I need to setup a remote docker somewhere so I can test my new code before doing a new release, sorry...
Cheers,
Mario
from fluentdocker.
@lorenzo93 I have now tested and committed the code to use one way of accessing remote docker daemons and defining those connections.
Please use the release 2.5.0 if you want to try it out. There's a new section in the documentation about connecting (and preparing for remote connections) at https://github.com/mariotoffia/FluentDocker#connecting-to-remote-docker-daemons.
Please note that it will re-use an already existing named connection but if it has to create a new one it will take considerable amount of time!
I would love to get your feedback on this!
Cheers,
Mario
from fluentdocker.
Thank you very much!!!
I'll give you a feedback on Monday (maybe Tuesday) when I'll be at work.
Cheers,
Lorenzo
from fluentdocker.
Perfect and I did a small change so use the 2.5.1 release instead.
from fluentdocker.
Since I haven't heard from you and I have myself successfully tested this feature both in windows and Linux - I'm closing this issue now. But if you have trouble, please don't hesitate to reply in this thread and I'll open it again.
from fluentdocker.
Thanks for the offer! :) Haven't thought about that. I'll think of something - but it will always be free and highly free willingly to donate.
Cheers,
Mario
from fluentdocker.
Related Issues (20)
- Changing a docker-compose file after it has been loaded HOT 1
- Create network if it doesn't exist HOT 1
- Missing docker's load HOT 2
- Docker compose profiles HOT 2
- .UseEnvironmentFile() does not seem to load the file at all HOT 1
- Ductus.FluentDocker.Common.FluentDockerException : Could not dispose composite service from file(s) HOT 3
- Is it possible to capture the StdOut of a container that exists after its tasks are finished?
- Document how to use a docker-compose.override file. HOT 1
- Allow to specify service to start from docker compose.
- Docker Compose v3 support HOT 1
- How to connect with Docker in Docker (dind) in a tekton pipeline HOT 1
- GetRunningProcesses extension failed on parsing TimeSpan
- Add podman support HOT 8
- FluentDockerException: Failed to find docker client binary - please add it to your path
- Docker compose status of existing project
- Bug - Compose File
- Docker Compose Up --wait support
- Problem with docker compose V2 support. HOT 6
- WaitForHttp not working for CosmosDb emulator container and no timeout HOT 4
- Support for Basic Authentication in WaitForHttp Method HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluentdocker.