Why I receive permission denied in Docker deployment?

后端 未结 2 1198
生来不讨喜
生来不讨喜 2021-01-27 05:36

I have created an application in Elastic Beanstalk to host a play framework 2 app there using instructions from this project.

I have packaged the project exactly like Do

2条回答
  •  借酒劲吻你
    2021-01-27 06:00

    Add a chmod command to make your file executable:

    RUN ["chmod", "+x", "bin/myApp"]
    

    So your Dockerfile will be:

    FROM dockerfile/java
    MAINTAINER Cristi Boariu 
    EXPOSE 9000
    ADD files /
    WORKDIR /opt/docker
    RUN ["chown", "-R", "daemon", "."]
    USER daemon
    RUN ["chmod", "+x", "bin/myApp"]
    
    ENTRYPOINT ["bin/mytweetalerts"]
    CMD []
    

提交回复
热议问题