I have already installed function node and when I deploy the flow it always gives an error message : "The workspace contains some unknown node types: function". Also I am unable to see the function node on left palette.
Is version of Node Red affects this? if yes then how I can go to old version in Node Red docker?
Attaching some screen shots.
Yes, that error is the reasons the Function node is failing to load. However I cannot explain why you are hitting it. A normal 1.3.5 build works just fine.
How exactly are you building the docker image?
Are you pulling the published image from dockerhub or building your own?
So you aren't using a proper build of node-red? You didn't mention that at the start.
What version of code is your custom red.min.js built from?
The error is because you have the 1.3.5 version of the Function node installed, but your custom red.min.js is older and doesn't provide the apis that version of the Function node expects.
If you are going to use a custom build of Node-RED, you really need to make sure you keep it all in sync and not just the editor.