does skaffold supports docker build without process?

15 views
Skip to first unread message

Guy Eli

unread,
Dec 8, 2022, 8:50:45 AM12/8/22
to skaffold-users
with the help of skaffold and minikube i have an up and running local cluster with several pods.

I would like to add a new docker that will be built automatically by `skaffold dev`

this docker will posses the test environment and will not have any process within it (no ENTRYPOINT), something like that:
```
FROM node:19
WORKDIR /usr/src/app
COPY package*.json ./
RUN npm install
COPY . .
```

after this will be built, i would like to execute:
`docker exec -it ubuntu_bash npm run test /` to execute the tests - so actually the test environment and it's complexity will built in a docker and so will be easy to shared between developers and test automation engineers as well as sending it to ci/cd as the next step.


the error i get is this:
`pod/tests-799d56754d-fsgp2: container tests is backing off waiting to restart`

for this deployment:
```
apiVersion: apps/v1
kind: Deployment
metadata:
  name: tests
  labels:
    app: tests
spec:
  strategy:
    type: Recreate
  replicas: 1
  selector:
    matchLabels:
      app: tests
  template:
    metadata:
      labels:
        app: tests
    spec:
      containers:
        - name: tests
          image: tests
```


i guess there is no reason for a pod if there is not a running process, but what are the other architecture options with skaffold do i have?







Reply all
Reply to author
Forward
0 new messages