Skip to content

'itamae docker' fails on remote_file resource when the image is created with non-root user #322

@fuminori-ido

Description

@fuminori-ido

When Dockerfile is:

FROM  centos:7
USER  games

and create image by:

docker build --tag itamae-docker-test:base - <Dockerfile

Then, the following recipe:

remote_file '/tmp/x.remote_user' do
  source '/etc/group'
end

fails as follows:

$  itamae docker --image itamae-docker-test:base --tag itamae-docker-test:remote_user recipe-remote_file.rb
 INFO : Starting Itamae... 
 INFO : Recipe: /home/.../recipe-remote_file.rb
ERROR :     stderr | chmod: changing permissions of '/tmp/itamae_tmp/1598837380.5531852/group': Operation not permitted
ERROR :     Command `chmod 0600 /tmp/itamae_tmp/1598837380.5531852/group` failed. (exit status: 1)
ERROR :   remote_file[/tmp/x.remote_user] Failed.

while 'execution' resource works fine under the same USER.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions