Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set WORKDIR value in container definition #9

Open
brianredbeard opened this issue Mar 12, 2021 · 1 comment
Open

Set WORKDIR value in container definition #9

brianredbeard opened this issue Mar 12, 2021 · 1 comment

Comments

@brianredbeard
Copy link

Due to an outstanding bug in containerd (containerd/containerd#4669) there is a problem when the value WORKDIR is set and user namespaces are in effect.

More detail on this can be seen in: kubernetes-sigs/kind#1331

In the meantime, as a workaround in the event that WORKDIR cannot be set, the value workingDir: / can be added to the container spec in the KNative serving definition, e.g.:

spec:
  template:
    metadata:
      creationTimestamp: null
    spec:
      containerConcurrency: 0
      containers:
        - image: >-
            docker.io/n3wscott/sockeye:v0.7.0@sha256:e603d8494eeacce966e57f8f508e4c4f6bebc71d095e3f5a0a1abaf42c5f0e48
          name: user-container
          readinessProbe:
            successThreshold: 1
            tcpSocket:
              port: 0
          resources: {}
          workingDir: /

This sets WORKDIR/workingDir to a value which will not necessitate any additional operations within the container.

@n3wscott
Copy link
Owner

n3wscott commented May 5, 2021

Interesting, the container was build with ko, so I don't have an easy way to adjust this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants