Starting container start sh file in host and container

Hi Team,

I am running simple .sh file but while starting container .sh file is starting in container as well as host, below are details. not sure why .sh file is running on both host and container, generally it should not run on host, kindly assist.
*
Scrip file (3.sh)
#!/bin/bash
while :
do
echo “keep running”
sleep 1
done


Dockerfile
FROM centos:centos7.9.2009
RUN mkdir /sample
WORKDIR /sample
COPY 3.sh /sample
#RUN chmod +x -R /sample
RUN chmod +x /sample/3.sh
CMD ["/sample/3.sh"]


docker build -t sample1 .
docker run -idt sample1


[centos@ip-172-31-87-46 sample]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9edcba6038f4 sample1 “/sample/3.sh” 7 minutes ago Up 7 minutes trusting_chatelet


Inside container
docker exec -it 9edcba6038f4 /bin/bash
[root@9edcba6038f4 sample]# ps -eaf
UID PID PPID C STIME TTY TIME CMD
root 1 0 0 16:11 pts/0 00:00:00 /bin/bash /sample/3.sh
root 513 0 0 16:19 pts/1 00:00:00 /bin/bash
root 531 1 0 16:20 pts/0 00:00:00 sleep 1


On host
[centos@ip-172-31-87-46 sample]$ ps -eaf | grep -i 3.sh
root 27434 27416 0 16:09 pts/0 00:00:00 /bin/bash /sample/3.sh