Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
819 views
in Technique[技术] by (71.8m points)

docker - starting container process caused "exec: \\"/app/start_combined_collector.sh\\": permission denied": unknown' ERROR:

the error msg is

Cannot start service nonJira_Processor: b'OCI runtime create failed: container_linux.go:345: starting container process caused "exec: \\"/app/start_combined_collector.sh\\": permission denied": unknown' ERROR: for nonJira_Processor

This is my dockerfile

ADD processors/nonjira_combined_processor_docker/start_combined_collector.sh start_combined_collector.sh
RUN chmod +x /app/start_combined_collector.sh
RUN ls -lrt
ENTRYPOINT ["/app/start_combined_collector.sh"]
CMD ["inputs"]

in start_combined_collector.sh

#!/bin/sh

java -jar $1.jar --spring.config.location=/app/properties/$1.properties

i have changed RUN ["chmod", "+x", "/app/start_combined_collector.sh"] but know use is there any problem with my start_combined_collector.sh because i tried to give chmod +x and 777 permission but still says permission denied

thanks in advance

question from:https://stackoverflow.com/questions/65851082/starting-container-process-caused-exec-app-start-combined-collector-sh

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Thanks you all for your response , i got the issue resolved, as i was copying the shell script to app directory of container which was mounted to volumes i found out that RUN command will not do anything if its mounted to volumes so i copied the shell script to other directory called script and ran it it worked BEFORE dockerfile

VOL /app
COPY start_combined_collector.sh **/app**
RUN chmod +x start_combined_collector.sh

AFTER

VOL /app
COPY start_combined_collector.sh **/script**
RUN chmod +x start_combined_collector.sh

as this time i am copying my start_combined_collector.sh to script directory which is not mounted to VOL it worked


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...