Docker Community Forums

Share and learn in the Docker community.

Dockerfile “Cannot start service” and 2 same service

Hello all !

I joined a company but I begin on Docker. The last dev write this code and i have a problem when I docker-compose up -d.

I use WSL 2 with Ubuntu 20.04.

We see 2 “moteur” but why? He create only one “moteur”
In the DockerFile he run the shell with chmod but i have this error.

If,you see many code error in this docker file or better solution for the best way say me. It’s not my code and I want to learn Docker.
I can give parts of codes on the docker-compose.yml if you need.

Creating ifolink_webapp_1 … done
Creating ifolink_portainer_1 … done
Creating ifolink_database_1 … done
Creating ifolink_dhcp_1 … done
Creating ifolink_memcache_1 … done
Creating ifolink_tmp_1 … done
Creating ifolink_scan_prod_1 … done
Creating ifolink_rabbitmq_1 … done
Creating ifolink_redis_1 … done
Creating ifolink_moteur_1 … error

ERROR: for ifolink_moteur_1 Cannot start service moteur: OCI runtime create failed: container_linux.go:349: starting container process caused “exec: “./run.sh”: permission denied”: unknown

ERROR: for moteur Cannot start service moteur: OCI runtime create failed: container_linux.go:349: starting container process caused “exec: “./run.sh”: permission denied”: unknown
ERROR: Encountered errors while bringing up the project.

FROM python:3.6.4-stretch

WORKDIR /IfoNet/Moteur
RUN echo "deb http://http.us.debian.org/debian jessie main contrib non-free" >> /etc/apt/sources.list
RUN cat /etc/apt/sources.list
RUN apt-get update && apt-get install -y \
    libffi-dev \
    psmisc \
    libsmi2-dev \
    snmp-mibs-downloader \
    memcached
RUN DEBIAN_FRONTEND=noninteractive apt-get install -y tshark

RUN pip install --upgrade pip
ADD ./Moteur/requirements.txt /IfoNet/Moteur
RUN pip3 install -r requirements.txt
ADD ./Moteur/run.sh /IfoNet/Moteur
RUN chmod +x run.sh
RUN groupadd -g 999 appuser && \
    useradd -r -u 999 -g appuser appuser
USER appuser
RUN ls
CMD ["./run.sh"]