Question
· Oct 12

Error when I want to build image: sudo: unable to allocate pty: Operation not permitted

What is the reason for

 

RUN apt-get update && apt-get install -y \
    git \
    nano \
    python3-opencv \
    sudo && \
    /bin/echo -e ${ISC_PACKAGE_MGRUSER}\\tALL=\(ALL\)\\tNOPASSWD: ALL >> /etc/sudoers && \
    sudo -u ${ISC_PACKAGE_MGRUSER} sudo echo enabled passwordless sudo-ing for ${ISC_PACKAGE_MGRUSER}
 

 

I think I get error because I do not have sudo privilege in the environment where I use podman to build the image

podman build --tag oliver3 .

 

I cloned iris-pero-ocr repo, added two large files into misc location, and I tried to build image. I see this:

 

Setting up libgl2ps1.4 (1.4.2+dfsg1-2) ...
Setting up libvtk9.1:amd64 (9.1.0+really9.1.0+dfsg2-3build1) ...
Setting up libopencv-viz4.5d:amd64 (4.5.4+dfsg-9ubuntu4) ...
Setting up libopencv-videoio4.5d:amd64 (4.5.4+dfsg-9ubuntu4) ...
Setting up adwaita-icon-theme (41.0-1ubuntu1) ...
update-alternatives: using /usr/share/icons/Adwaita/cursor.theme to provide /usr/share/icons/default/index.theme (x-cursor-theme) in auto mode
Setting up humanity-icon-theme (0.6.16) ...
Setting up ubuntu-mono (20.10-0ubuntu2) ...
Processing triggers for libglib2.0-0:amd64 (2.72.4-0ubuntu2.3) ...
Setting up libgtk-3-0:amd64 (3.24.33-1ubuntu2.2) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
Setting up libgtk-3-bin (3.24.33-1ubuntu2.2) ...
Setting up libopencv-highgui4.5d:amd64 (4.5.4+dfsg-9ubuntu4) ...
Setting up at-spi2-core (2.44.0-3) ...
Setting up libopencv-contrib4.5d:amd64 (4.5.4+dfsg-9ubuntu4) ...
Setting up python3-opencv:amd64 (4.5.4+dfsg-9ubuntu4) ...
Processing triggers for libgdk-pixbuf-2.0-0:amd64 (2.42.8+dfsg-1ubuntu0.3) ...
Processing triggers for libc-bin (2.35-0ubuntu3.8) ...
sudo: unable to allocate pty: Operation not permitted
subprocess exited with status 1
subprocess exited with status 1
Error: building at STEP "RUN apt-get update && apt-get install -y       git     nano     python3-opencv         sudo &&         /bin/echo -e ${ISC_PACKAGE_MGRUSER}\\tALL=\(ALL\)\\tNOPASSWD: ALL >> /etc/sudoers &&       sudo -u ${ISC_PACKAGE_MGRUSER} sudo echo enabled passwordless sudo-ing for ${ISC_PACKAGE_MGRUSER}": exit status 1

Product version: IRIS 2024.1
Discussion (0)1
Log in or sign up to continue