skaffold icon indicating copy to clipboard operation
skaffold copied to clipboard

Skaffold stops restarting my container after some time passes

Open thardy opened this issue 1 year ago • 1 comments

Expected behavior

When my source code changes, the files get synced into my container and my container gets restarted.

Actual behavior

The source code gets synced into my container, and my container gets restarted - for a short period of time. After some time, maybe an hour, maybe a day, the sync continues to happen but the restart always stops. It simply stops working after some time passes.

Information

  • Skaffold version: 2.11.0
  • Operating system: Windows 10
  • Installed via: Manual download - https://storage.googleapis.com/skaffold/releases/latest/skaffold-windows-amd64.exe
  • Contents of skaffold.yaml:
apiVersion: skaffold/v4beta3
kind: Config
manifests:
  rawYaml:
    - ./k8s/*
build:
  local:
    push: false
  artifacts:
    - image: timhardy/kazuku-admin-api
      context: admin-api
      docker:
        dockerfile: Dockerfile
      sync:
        manual:
          - src: 'src/**/*.ts'
            dest: .

Steps to reproduce the behavior

  • Contents of Dockerfile:
FROM node:alpine

WORKDIR /app
COPY package.json .
RUN npm install
COPY . .

CMD ["npm", "start"]
  • Contents of package.json (just the scripts property):
{
  "scripts": {
    "start": "ts-node-dev --poll src/index.ts"
  },
}

I've tried both the "ts-node-dev --poll src/index.ts" as it is now, as well as "ts-node-dev src/index.ts". Both variations behave the same - they stop restarting the container after some time passes. The --poll feature tends to last a bit longer, but that could easily be anecdotal.

Notice how the container is restarting, then it simply stops...

image

I just launched it with the -vdebug option - I will follow up with some logging, once I wait for a bit and get it to stop working again.

thardy avatar Apr 30 '24 19:04 thardy

I'm wondering if this is more of a ts-node-dev issue.

thardy avatar Apr 30 '24 20:04 thardy