Home > Blockchain >  DOCKER "Error response from daemon: dockerfile parse error line 38: unknown instruction: ENTRYP
DOCKER "Error response from daemon: dockerfile parse error line 38: unknown instruction: ENTRYP

Time:12-22

I'm new to docker and I'd like to understand the reason for this error, I'm creating a dockerfile where to start Elasticsearch, Mysql and the application, when I build it gives me this error "Error response from daemon: dockerfile parse error line 38: instruction unknown: ENTRYPOINT["/BIN/ENTRYPOINT.SH"]"

Dockerfile

FROM ubuntu:20.04
WORKDIR \\wsl.localhost\Ubuntu\home\marco\project\multiple-docker-container\backend
COPY . .
RUN apt update
RUN apt-get update
RUN apt-get install wget -y
RUN apt install apt-transport-https ca-certificates gnupg -y
RUN wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | apt-key add -
RUN sh -c 'echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" > /etc/apt/sources.list.d/elastic-7.x.list'
RUN apt-get update -y
RUN apt-get install elasticsearch -y
RUN apt install mysql-server -y
RUN apt install npm -y
RUN npm install
RUN npm install nodemon
RUN apt install nodejs -y
EXPOSE 3306 
EXPOSE 9200
EXPOSE 5000
COPY entrypoint.sh /bin/entrypoint.sh
RUN chmod  x /bin/entrypoint.sh
ENTRYPOINT ["/bin/entrypoint.sh"]

entrypoint.sh

#!/bin/sh

service elasticsearch start

service elasticsearch enable

service mysql start

npm start `

What could be the problem? I'm running this on an ubuntu terminal

CodePudding user response:

In your question you wrote ENTRYPOINT["/BIN/ENTRYPOINT.SH"], in the Dockerfile I see ENTRYPOINT ["/BIN/ENTRYPOINT.SH"].

If your are talking about ENTRYPOINT["/BIN/ENTRYPOINT.SH"] the error is the missing space before the opening square bracket.

  • Related