OCI runtime create failed starting container process caused: exec permission denied
ERROR: for container Cannot start service OCI runtime create failed starting container process caused: exec: "/usr/src/entrypoint.sh": permission denied: unknown
Intentando instalar este simple dockerfile con python 3.8
FROM python:3.8
WORKDIR /usr/src/python
#RUN: ejecuta comandos en el momento de la creacion de la imagen
# RUN apt-get update install vim
# RUN pip install pipenv
COPY ./docker/.bashrc /root/.bashrc
COPY ./docker/entrypoint.sh /usr/src/entrypoint.sh
WORKDIR /usr/src/pyprint
Me aparecía el siguiente error
Successfully built d65ef3592674
Successfully tagged pyprint_python38:latest
Creating cont-py38 ... error
ERROR: for cont-py38 Cannot start service python38:
OCI runtime create failed: container_linux.go:370:
starting container process caused: exec: "/usr/src/entrypoint.sh": permission denied: unknown
ERROR: for python38 Cannot start service python38: OCI runtime create failed:
container_linux.go:370: starting container process caused: exec: "/usr/src/entrypoint.sh":
permission denied: unknown
ERROR: Encountered errors while bringing up the project.
make[1]: *** [build] Error 1
make: *** [rebuild] Error 2
El problema está en la ejecución del .sh dentro del contenedor, para esto hay que agregar la siguiente linea despues del COPY ./docker/entrypoint.sh /usr/src/entrypoint.sh
...
COPY ./docker/.bashrc /root/.bashrc
COPY ./docker/entrypoint.sh /usr/src/entrypoint.sh
RUN chmod +x /usr/src/entrypoint.sh
...
Resultado
Autor: Eduardo A. F.
Publicado: 19-01-2021 23:39