When I run docker build on my codebase, it doesn’t apply the file modifications. I’m using TypeScript with Node as the language/framework. Here is my Dockerfile:
#Imports the node runtime/os base image
FROM node:14
#like cd into the working directory
WORKDIR /usr/src/app
ENV PORT 8080
#copies the package.json from the local dev machine and pastes it in the ./ directory on google cloud run
COPY package*.json ./
#runs on the cloud run instance terminal
RUN npm install --only=production
#copy the actual code from the . directory (root) and places it in the cloud run root.
COPY . .
EXPOSE 8080
RUN rm -rf src
#Start the service on instance startup
CMD ["npm", "start"]