<p>I'm trying to learn my way around Kubernetes with Google Cloud Platform. I have a small Vue-based application working locally with the following <code>Dockerfile</code> and <code>docker-compose.yml</code>. </p>

<p>Building and bringing up this project locally works great. However, when using <code>kompose up</code> to create a deployment/svc/etc. for this thing, the container fails to build properly. Ultimately it ends up in a crashing loop.</p>

<p>Inspecting the logs shows that the issue is that <code>npm</code> cannot find <code>/opt/eyeball/package.json</code> or <code>/opt/eyeball/package-lock.json</code>. I'm confused since this isn't an issue when I build and push the image that my cluster is ultimately pulling down - those files are right where you'd expect them to be based on my <code>Dockerfile</code>. Any idea why this might be happening?</p>

<p><em>Dockerfile</em></p>

<pre><code>FROM node:8-alpine
RUN apk --no-cache --update add gzip
RUN mkdir -p /opt/eyeball
ADD ./package.json /opt/eyeball
ADD ./package-lock.json /opt/eyeball
WORKDIR /opt/eyeball
RUN npm install
ADD . /opt/eyeball
</code></pre>

<p><em>docker-compose.yml</em></p>

<pre><code>version: '3'

networks:
  default:
    external:
      name: overmind

services:
  eyeball:
    image: registry.gitlab.com/souldeux/eyeball:latest
    environment:
      - HOST=0.0.0.0
    ports:
      - "8080:8080"
    volumes:
      - ./:/opt/eyeball
    entrypoint: "npm run dev"
</code></pre>

<p>You need to delete the <code>volumes:</code> block in your <code>docker-compose.yml</code> file.</p>

<p>The <code>volumes:</code> block in your <code>docker-compose.yml</code> directs Docker to take the contents of your local directory and mount them into the container, which hides everything that you add in the <code>Dockerfile</code>.  When you deploy this with Kompose, this gets translated to Kubernetes directives, but since the Kubernetes environment doesn't have your local development environment, this results in the deployed containers failing.</p>
