i create a docker image using the following Dockerfile
FROM java:8-jdk
ENV DOCKER_HOME /docker
ENV CRAWLER_HOME /docker/crawler
RUN groupadd crawler && useradd -g crawler crawler
RUN mkdir -p ${DOCKER_HOME}
RUN mkdir -p ${CRAWLER_HOME}
COPY ./ ${CRAWLER_HOME}
RUN ls -la ${CRAWLER_HOME}/*
RUN chown -R crawler:crawler ${DOCKER_HOME} && chmod -R 755 ${DOCKER_HOME}
WORKDIR $CRAWLER_HOME
ENTRYPOINT [ "/docker/crawler/docker/Entrypoint.sh" ]
when i run the image without -v option it works fine(docker run sampleimage:1.0). But when i run with -v it gives the follwing error
docker run -v ~/docker:/docker sampleimage:1.0
docker: Error response from daemon: OCI runtime create failed: container_linux.go:367:
starting container process caused: exec: "/docker/crawler/docker/Entrypoint.sh": stat
/docker/crawler/docker/Entrypoint.sh: no such file or directory: unknown.
ERRO[0000] error waiting for container: context canceled
while building the image i tried to list the file in CRAWLER_HOME and the Entrypoint.sh file is present. Unable to find out why it is throwing no such file or directory while running.
~/docker/crawler/docker/Entrypoint.sh
exist on your host? If so, what is the first line?