oracle / docker-images

Official source of container configurations, images, and examples for Oracle products and projects

Home Page:https://developer.oracle.com/use-cases/#containers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

chmod: changing permissions of '/opt/install/installDBBinaries.sh': Operation not permitted

lejudika opened this issue · comments

Hi,
when running the following command:
sudo ./buildContainerImage.sh -v 19.3.0 -s -i
it crashes in Step 15 :
`
Step 13/25 : COPY --chown=oracle:dba $INSTALL_FILE_1 $INSTALL_RSP $INSTALL_DB_BINARIES_FILE $INSTALL_DIR/
---> 4dbf312fbbad
Step 14/25 : USER oracle
---> Running in 78740df6c8a5
Removing intermediate container 78740df6c8a5
---> 70a46086ced6
Step 15/25 : RUN chmod ug+x "$INSTALL_DIR"/.sh && sync && "$INSTALL_DIR"/"$INSTALL_DB_BINARIES_FILE" $DB_EDITION
---> Running in ee08db8337f2
chmod: changing permissions of '/opt/install/installDBBinaries.sh': Operation not permitted
Removing intermediate container ee08db8337f2
The command '/bin/sh -c chmod ug+x "$INSTALL_DIR"/
.sh && sync && "$INSTALL_DIR"/"$INSTALL_DB_BINARIES_FILE" $DB_EDITION' returned a non-zero code: 1

ERROR: Oracle Database container image was NOT successfully created.
ERROR: Check the output and correct any reported problems with the build operation.

`
I can't find any workaraound and I don't understand why this Error happens.
Any help highly appreciated, thanks in advance!

Do you have enough disk space? Can you please paste the output of docker info

My docker info output:

Client:
Context: default
Debug Mode: false

Server:
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 34
Server Version: 20.10.25
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
userxattr: false
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: io.containerd.runtime.v1.linux runc io.containerd.runc.v2
Default Runtime: runc
Init Binary: docker-init
containerd version:
runc version:
init version:
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 5.15.0-78-generic
Operating System: Ubuntu 20.04.6 LTS
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 15.58GiB
Name: ubuntu
Docker Root Dir: /var/lib/docker
Debug Mode: false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

initially I had 60 GB diskspace - after running the script several times (always with the error mentionend in this issue), I got an error concerning not enough space left once, so I made room again.
After that, I had just the same chmod-Error again.

Thanks for your help!

I had the same issue while trying to build it in Ubuntu 22.04.
I had with versions 19.3.0 and 21.3.0

I typed:

/docker-images/OracleDatabase/SingleInstance/dockerfiles$ ./buildContainerImage.sh -v 21.3.0 -s

Step 10/24 : FROM base AS builder
---> a84f769e3b8a
Step 11/24 : ARG DB_EDITION
---> Running in 1dc5e70c94cf
Removing intermediate container 1dc5e70c94cf
---> 9bf31d53be32
Step 12/24 : COPY --chown=oracle:dba $INSTALL_FILE_1 $INSTALL_RSP $INSTALL_DB_BINARIES_FILE $INSTALL_DIR/
---> 2cec7eab9e57
Step 13/24 : USER oracle
---> Running in a0697f55686e
Removing intermediate container a0697f55686e
---> 60711665983c
Step 14/24 : RUN chmod ug+x $INSTALL_DIR/.sh && sync && $INSTALL_DIR/$INSTALL_DB_BINARIES_FILE $DB_EDITION
---> Running in 317c7409c1af
chmod: changing permissions of '/opt/install/installDBBinaries.sh': Operation not permitted
Removing intermediate container 317c7409c1af
The command '/bin/sh -c chmod ug+x $INSTALL_DIR/
.sh && sync && $INSTALL_DIR/$INSTALL_DB_BINARIES_FILE $DB_EDITION' returned a non-zero code: 1

ERROR: Oracle Database container image was NOT successfully created.
ERROR: Check the output and correct any reported problems with the build operation.

I tried manually giving the necessary permissions in all folders but it didn't work.
I also tried running the terminal as root but nothing changed.

May be your /var/lib/docker is mount that is not owned by your user id or has some size quota set.

Thanks for replying. How can i proceed to solve this issue?.

Try building with podman or pull the prebuilt image from container registry:

container-registry.oracle.com/database/enterprise:19.3.0.0

Hi @OtavioRMC @lejudika
I tested this on my machine by building 19c locally. This error is not reproducible. Please try with podman and reopen the issue if it persist.