Question

How to copy yml file from local system to droplets ?

Hi, I am new to docker and in learning phase. I want to copy the yml file from my system to droplets and run that file on the droplets node so that i can test some swarm functionality.

How to achieve it and what is the best practice to do it .

Thanks.

Show comments

Submit an answer

This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

Hi @skriss03,

I’ll recommend using either rsync or scp via your terminal to copy the file over. It’s simple and it takes less than 10 seconds.

The scp command syntax take the following form:

scp [OPTION] [user@]SRC_HOST:]file1 [user@]DEST_HOST:]file2
  • OPTION - scp options such as cipher, ssh configuration, ssh port, limit, recursive copy …etc.
  • [user@]SRC_HOST:]file1 - Source file.
  • [user@]DEST_HOST:]file2 - Destination file Local files should be specified using an absolute or relative path, while remote file names should include a user and host specification.

Same goes for the Rsync command, same syntax just different options. For beginners, I’ll recommend starting off with SCP.

Regards, KFSys