I'm a super novice vis-a-vis Docker, and recently moved a project from App Engine to Cloud Run. Was easy-peasy, loved it.
Now, however, I'm trying to update the image (since I added some new code). I understand that I need to get into an actual container to update an image (I think?) but when I attempt to docker run, I get an unexpected operator error.
It's driving me absolutely batty.
I can't start the container. I can't edit my image. I can't upload a new version on Cloud Run.
From what I can gather, an unexpected operator error has to deal with the Dockerfile. So, here's my Dockerfile (as given by Google for deploying an image on Cloud Run).
Dockerfile
#Use the official Node.js 10 image
#https://hub.docker.com/_/node
FROM node:10
#Create and change to the app directory
WORKDIR /usr/src/app
#Copy application dependency manifests to the container image.
#A wild card is used to ensure both package.json AND package-lock.json are copied.
#Copying this separately prevents re0running npm install on every code change.
COPY *package.json ./
#Install production dependences
RUN npm install --only=production
#COPY local code to the container image
COPY . .
#Run the web service on container startup
CMD [ "npm", "start" ]
The specific unexpected operator error I am getting is /bin/sh: 1: [: npm.: unexpected operator
I honestly don't know what to do at this point. I think I need a second set of eyes to just look it over.