-2
# cat Dockerfile
FROM golang:1.10
WORKDIR /go/src/app
COPY source .
RUN go install -v
ENTRYPOINT [“app”,”-single=true”,”-port=8080"]

# docker run -p 8080:8080 valkyrie-app:v0.0.1 
/bin/sh: 1: Syntax error: Unterminated quoted string

Getting this error while running docker run but docker build was successfull, can you please suggest on this error?

#docker build -t valkyrie-app:v0.0.1 .
.....
Successfully built d9ad881d0278
Successfully tagged valkyrie-app:v0.0.1
Charles Duffy
  • 280,126
  • 43
  • 390
  • 441
LAK
  • 1
  • 1
  • 1
  • 1
    Does this answer your question? [/bin/sh: 1: \[“npm”,: not found on docker-compose up](https://stackoverflow.com/questions/48192444/bin-sh-1-npm-not-found-on-docker-compose-up) – Charles Duffy Apr 17 '20 at 15:33

1 Answers1

2

and are not valid JSON quotes. Only " is a legitimate quote, in either JSON or POSIX sh.

Thus, your RUN command is not valid JSON, so it's being parsed as a shell command (with only one valid double-quote character instead of matched pairs, hence the specific error seen).

If you're on MacOS, see How to Disable Smart Quotes on Ask Different.

Charles Duffy
  • 280,126
  • 43
  • 390
  • 441