Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

353
Views
Unexpected token in docker logs after docker run

After running:

docker run -d nodeapi -p 49160:3000

The container doesnt start and when I look at docker logs I see the error:

[eval]:1
49160:3000

SyntaxError: Unexpected token :

Here's my Dockerfile:

FROM node:10

WORKDIR /usr/app

COPY package.json ./

RUN npm install

COPY . .

EXPOSE 3000

CMD ["npm", "start"]

edit: I'm running that on Windows 10 via Docker Toolbox

over 4 years ago · Santiago Trujillo
1 answers
Answer question

0

The -p 49160:3000 needs to be before the container image nodeapi. The way you have it, -p 49160:3000 is passed to the container's npm start as if it were command-line flags|params. Clearly, it doesn't like the colon.

So.

docker run --detach --publish 49160:3000 nodeapi 

While you debug, it may be preferable to run the container interactively:

docker run --interactive --tty --publish=49160:3000 nodeapi
over 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!