Skip to Content
Technical Articles
Author's profile photo Jacky Liu

Build SFTP with docker and use BTP Cpi to test the OP SFTP Service

Today I supported  a customer for CPI sftp call . I blog down the test process for your reference .

The prerequisite is :

Docker has been install on your laptop.

SAP Cloud connector has been installed and configured on you laptop

You have configured  BTP Cloud platform integration suite .

You have installed WinSCP to test SFTP service

You have installed postman to test deployed cpi iflow

 

The following is the steps :

Step 1, Build SFTP  with docker on laptop

pull sftp image with following command:

docker pull atmoz/sftp

run the image with the following command:

docker run –name mysftp20 -v C:\Users\userid\Documents\sftpupload:/home/foo/upload –privileged=true -p 2222:22 -d atmoz/sftp foo:pass:100

2

foo is the sftp username , pass is the sftp password . The local port 2222 is linked to container port 22 . The following local directory is bind to the docker container:

C:\Users\userid\Documents\sftpupload

test the sftp with winSCP

 

Step 2: configure sap cloud connector to map the sftp service :

 

check in BTP Cockpit sub account:

 

Step 3: create user name and password in cpi for SFTP service

 

 

Step 4: test SFTP service with CPI

Step 5: create IFLOW to call sftp

Step 6: use postman to test the deployed iflow

use key from CPI runtime in BTP cockpit subaccount as oauth2.0 information

use postman to test cpi iflow

 

Step 7: check the result in sftp file

The end

Thanks!

 

Assigned Tags

      3 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Avinash Mallashetty
      Avinash Mallashetty

      Hi Jacky Liu, interesting blog. thanks for sharing.

      I am curious to know why docker used here and how docker was installed.

      reg, Avinash

      Author's profile photo Jacky Liu
      Jacky Liu
      Blog Post Author

      Hi, Avinash,

      Thanks !

      Customers or Partners need to know CPI SFTP adapter use case end to end. Docker is the simple way to create docker service on laptop . So docker is for testing purpose .

      The following is the document for docker install .

      https://docs.docker.com/desktop/windows/install/

      Best Regards!

      Jacky Liu

       

       

       

      Author's profile photo Saurabh Kabra
      Saurabh Kabra

      Interesting way to deploy your own SFTP server on a local machine. Thanks Jacky to such a share!

       

      Best

      Saurabh