1

ENNTRYPOINT の後にコンテナー プロンプトを表示するために、Dockerfile の最後に追加できるコマンドはどれですか? 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"] 

4

2 に答える 2