AnsweredAssumed Answered

Cannot terminate docker container with Ctrl-C

Question asked by xmlking on Jun 11, 2017
Latest reply on Jun 27, 2017 by trichmond
I am using following dockerfile. When I start the container in interactive mode i.e,

docker run -it --cap-add SYS_ADMIN --cap-add SYS_RESOURCE --device /dev/fuse -e MAPR_CLUSTER=cluster1 -e MAPR_CLDB_HOSTS=192.168.56.101 -e MAPR_CONTAINER_USER=mapr -e MAPR_MOUNT_PATH=/mapr sumo/demo:0.1.0
I cannot terminate interactive shell with Ctrl-C
I was able to
terminate for other (nom-PACC) dockerfiles while using ENTRYPOINT
Since we have to run "
start" and my jar command, my options are now limited to  CMD
looking for fix to make Ctrl-C work again...

FROM
maprtech/pacc:5.2.1_3.0_centos7

ARG JAR_NAME
ARG JAVA_OPTS
ARG PORT

#MapR Setup
ADD ssl_truststore /opt/mapr/conf/

#VOLUME /tmp
WORKDIR /app
ADD $JAR_NAME app.jar
RUN touch run.sh
EXPOSE $PORT
ENV PORT=$PORT
ENV JAVA_OPTS=$JAVA_OPTS
#ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Dserver.port=$PORT -Djava.security.egd=file:/dev/./urandom -jar app.jar" ]
CMD ["start", "sh", "-c", "java $JAVA_OPTS -Dserver.port=$PORT -Djava.security.egd=file:/dev/./urandom -jar app.jar" ]

Outcomes