Reputation: 331
My Dockerfile:
FROM centos:7.2
COPY gateway-deploy-1.1-SNAPSHOT /home/admin/gateway/
COPY entrypoint.sh /home/admin/entrypoint.sh
RUN chmod +x /home/admin/entrypoint.sh
EXPOSE 12366
VOLUME ["/home/admin/logs"]
ENTRYPOINT ["sh", "/home/admin/entrypoint.sh"]
When I start the container, entrypoint.sh
should be executed, but the system prompts "No such file or directory". I tried to change the startup command to "/bin/bash" and then went to the container to see that the file exists.
Why is this problem? I have tried to make images many times, but this problem has always existed.
Upvotes: 2
Views: 2610
Reputation: 331
Since I mounted an empty directory from the host to the path /home/admin when I started the container, the file was overwritten. So this is not a problem, but my mistake.
Upvotes: 1