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

HOME directory is not writable for source image user #301

Open
Berber31 opened this issue Sep 23, 2021 · 0 comments
Open

HOME directory is not writable for source image user #301

Berber31 opened this issue Sep 23, 2021 · 0 comments

Comments

@Berber31
Copy link

Berber31 commented Sep 23, 2021

Executing a task with registry-image v1.4.0, the HOME directory is not writable for the user defined in the source image.

example:

jobs:
  - name: boxboat-kubectl
    plan:
      - in_parallel:

        - task: kubectl-registry-image-user-default-dans-home
          config:
            platform: linux
            image_resource:  
              type: registry-image
              source:
                repository: ((docker_poleemploi.registre))/boxboat/kubectl
                tag: 1.20.5
            run:
              path: /bin/sh
              args:
                - -euc
                - |       
                  id
                  ls -lart $HOME
                  echo "test" > $HOME/.kubeconfig

fails producing:

uid=1000(alpine) gid=1000(alpine)
total 8
drwxr-xr-x    3 root     root          4096 Sep 23 13:20 ..
drwxr-xr-x    2 root     root          4096 Sep 23 13:20 .

/bin/sh: can't create /home/alpine/.kubeconfig: Permission denied

However with docker-image resource it does not fail:

        - task: kubectl-docker-image    
          config:
            platform: linux
            image_resource:  
              type: docker-image
              source:
                repository: ((docker_poleemploi.registre))/boxboat/kubectl
                tag: 1.20.5
            run:
              path: /bin/sh
              args:
                - -euc
                - |             
                  id
                  ls -lart $HOME
                  echo "coucou" > $HOME/.kubeconfig    

success with:

uid=1000(alpine) gid=1000(alpine)
total 8
drwxr-xr-x    3 root     root          4096 Sep 23 08:55 ..
drwxr-sr-x    2 alpine   alpine        4096 Sep 23 08:55 .

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

1 participant