-
Notifications
You must be signed in to change notification settings - Fork 74
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
Operation not permitted - changing permission #138
Comments
I can reproduce, seems that buildah doesn't like that image:
But I when I try to play with the image, it works fine:
I don't understand what's wrong. To make things worse, the same error happens when I build as root. So this is definitely a bug, but I literally have no idea if this is bender, ansible or buildah. |
I have also noticed the same, can seen the error even when run as root. I was at the impression that it was buildah, since bender was trying to run a buildah command to change permission on the folder? |
It's not bender, it's ansible who copies the AnsiballZ_setup.py file to /tmp in the container, then tries to change the perms and then invoke the file. |
Seeing a similar error message in a issue raised in splunk/docker-splunk#105 Wondering if this an issues with the storage driver. I recon buildah defaults to overlay and doesn't support overlay2. |
I get around it by building a base image. Switching the user to root, Dockerfile :
|
To add to the confusion: I get this error while building a docker image with packer, but only if I don't use root. My molecule playbooks work just fine on the same base image (ubuntu:18.04). The prepared image's HCL file is below if you're interested. packer {
required_plugins {
docker = {
version = ">= 0.0.7"
source = "github.com/hashicorp/docker"
}
}
}
source "docker" "ubuntu" {
image = "ubuntu:18.04"
commit = true
changes = [
"WORKDIR /home/esd",
"USER esd"
]
run_command = ["-d", "-i", "-t", "{{.Image}}", "/bin/bash"]
}
build {
name = "ubuntu"
source "source.docker.ubuntu" {
name = "development"
}
provisioner "shell" {
# Install some requirements that the ubuntu container doesn't come with.
inline = [
"apt-get update && apt-get install -y python3.6 acl",
"add-apt-repository 'deb http://archive.ubuntu.com/ubuntu/ bionic universe' && apt-get update",
"apt-get install -y python3.6 python3-pip python-urllib3 python-openssl python-pyasn1 sudo",
"useradd --groups sudo -ms /bin/bash esd",
"echo esd:redacted | chpasswd",
]
}
post-processors {
post-processor "docker-tag" {
repository = "frappe-base"
tags = ["latest"]
}
post-processor "docker-save" {
path = "prepared.tar"
}
}
} The playbook below attempts to run some configuration on the "prepared" image above, with the esd user. It consistently fails at "Gathering Facts". packer {
required_plugins {
docker = {
version = ">= 0.0.7"
source = "github.com/hashicorp/docker"
}
}
}
source "docker" "ubuntu" {
image = "frappe-base:latest"
pull = false
commit = true
run_command = ["-d", "-i", "-t", "{{.Image}}", "/bin/bash"]
}
build {
name = "ubuntu"
source "source.docker.ubuntu" {
name = "development"
}
provisioner "ansible" {
playbook_file = "./frappe-bench.yml"
user = "esd"
}
post-processors {
post-processor "docker-tag" {
repository = "frappe"
tags = ["latest"]
}
post-processor "docker-save" {
path = "docker.tar"
}
}
} |
New to ansible-bender, was trying to create a custom awx_task/awx_web container using ansible-bender
host os: ubuntu
Default installation: haven't changed any config
Am I seeing the following error message, since the original container was build as root user?
Error message:
Playbook:
The text was updated successfully, but these errors were encountered: