Issue
im running a docker container as shown below, after the sh files are executed the container terminate by default, how i can keep the container working in background
#=========================
# Copying Scripts to root
#=========================
COPY entry_point.sh \
/root/
RUN chmod +x /root/entry_point.sh
#=======================
# framework entry point
#=======================
CMD /root/entry_point.sh
the entry_point.sh file
function clone_repo() {
mkdir /root/repo
git clone [email protected]:test/tests.git /root/repo && \
rm -rf /root/.ssh
}
clone_repo
and here is the command im using to initialize the container
docker run -p 5900:5900 --name mycontainer--privileged amrka/image
Solution
Solved by removing entry_point
Answered By - Amr Kamel Answer Checked By - Pedro (WPSolving Volunteer)