可以在 Dockerfile 底部添加什么命令以在 ENNTRYPOINT 之后进入容器提示符?Dockerfile 运行正常。只是它从执行它的地方回到提示。
# Pull base image
From ubuntu:18.04
LABEL maintainer="tester@gmail.com"
# Install dependencies
RUN apt-get update -y
RUN apt-get install -y build-essential python3.6 python3.6-dev python3-pip python3.6-venv
RUN apt-get install -y vim
RUN python3.6 -m pip install pip --upgrade
RUN pip3 install pytest pytest-cache
RUN pip3 install pylint
RUN pip3 install requests
# Create working directory
RUN mkdir /testsuite
# Copy project
COPY comments_categories_api /testsuite/comments_categories_api
COPY comments_posts_api /testsuite/comments_posts_api/
RUN chmod -R a+rwX testsuite/
# Set working directory
WORKDIR /testsuite
# Set Python version
RUN echo alias python='/usr/bin/python3' >> ~/.bashrc
# RUN echo cd testsuite/ >> ~/.bashrc
# Define ENTRYPOINT
COPY ./docker-entrypoint.sh /testsuite/docker-entrypoint.sh
RUN ["chmod", "+x", "/testsuite/docker-entrypoint.sh"]
ENTRYPOINT ["sh", "/testsuite/docker-entrypoint.sh"]