How to run custum component in docker

The documention says how to build a custom componet.Now I have success run it in my windows and centos system.Now I want to use docker to deploy it .I do not know how to export the environment to my image like this.

.Please give me some suggestion .Thanks a lot.