Todo app build failing when deploying on AWS Linux using docker in WSL2

So I was trying to deploy a simple CD pipeline using docker by ssh’ing into my AWS Linux EC2 instance in WSL2 terminal. The job is failing everytime returning the following error:

Started by user Navdeep Singh Running as SYSTEM Building on the built-in node in workspace /var/lib/jenkins/workspace/todo-dev [todo-dev] $ /bin/sh -xe /tmp/jenkins6737039323529850559.sh + cd /home/ubuntu/project/django-todo /tmp/jenkins6737039323529850559.sh: 2: cd: can’t cd to /home/ubuntu/project/django-todo Build step ‘Execute shell’ marked build as failure Finished: FAILURE

Config:

DockerFile contents:

FROM python:3
RUN pip install django==3.2

COPY . .

RUN python manage.py migrate

CMD [“python”,“manage.py”,“runserver”,“0.0.0.0:8000”]

Where are you doing the ssh part? It’s saying /home/ubuntu/project/django-todo isn’t available on the agent (built-in node so controller).

I think you are missing the ssh part

You’ll probably want something like shell - SSH heredoc: bash prompt - Stack Overflow to run multiple commands over a single ssh session

On my WSL2 terminal. SSHing into my Amazon Linux machine from there. Actually what I did was following exactly these steps to deploy my first Jenkins job.

Okay but you are not sshing at all in your job. Are you wanting to?

In my previous reply I told you what was wrong and at least one idea how to fix it. Do those not work? Do you need more help?