Jenkins not recognizing docker and aws-cli

I made a copy of my jenkins server’s homefolder and transferred it to another macOS where a fresh jenkins install was made

I have docker and AWS CLI installed, but when i run a project:

[Pipeline] sh

+ aws ecr get-login-password --region eu-central-1
/Users/admin/.jenkins/workspace/<any project name>@tmp/durable-e30d19d2/script.sh: line 1: aws: command not found

+ docker login --username AWS --password-stdin 222287*****.dkr.ecr.eu-central-1.amazonaws.com
/Users/admin/.jenkins/workspace/<any project name>@tmp/durable-e30d19d2/script.sh: line 1: docker: command not found

[Pipeline] }
[Pipeline] // withCredentials