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

dockerfile:174 error is an error code, but I don't know which configuration part the error is in. #2737

Open
ljkoy26-desktop opened this issue Dec 11, 2023 · 5 comments

Comments

@ljkoy26-desktop
Copy link

An error occurred near dockerfile:174 during docker build.
It says it ended with exit code 127, but
I don't know what to reset.

--------------------- error log ----------------

Container Image set to : oracle/database-rac:21.3.0
Checking if required packages are present and valid...
LINUX.X64_213000_db_home.zip: OK
LINUX.X64_213000_grid_home.zip: OK

DOCKER info:
Client: Docker Engine - Community
Version: 24.0.7
Context: default
Debug Mode: false
Plugins:
buildx: Docker Buildx (Docker Inc.)
Version: v0.11.2
Path: /usr/libexec/docker/cli-plugins/docker-buildx
compose: Docker Compose (Docker Inc.)
Version: v2.21.0
Path: /usr/libexec/docker/cli-plugins/docker-compose

Server:
Containers: 11
Running: 1
Paused: 0
Stopped: 10
Images: 21
Server Version: 24.0.7
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Using metacopy: false
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.runc.v2 runc
Default Runtime: runc
Init Binary: docker-init
containerd version: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
runc version: v1.1.10-0-g18a0cb0
init version: de40ad0
Security Options:
apparmor
seccomp
Profile: builtin
Kernel Version: 5.4.0-167-generic
Operating System: Ubuntu 20.04.6 LTS
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 1.894GiB
Name: jhlee-vm-ubuntu
ID: 8c51b8ee-5dd3-4f1e-a7ae-f1d6fec88c48
Docker Root Dir: /var/lib/docker
Debug Mode: false
Username: ljkoy26@naver.com
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: No swap limit support

Building image 'oracle/database-rac:21.3.0' ...
[+] Building 139.2s (13/17) docker:default
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 11.65kB 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 2B 0.0s
=> [internal] load metadata for docker.io/library/oraclelinux:7 11.3s
=> [auth] library/oraclelinux:pull token for registry-1.docker.io 0.0s
=> CACHED [base 1/1] FROM docker.io/library/oraclelinux:7@sha256:e6d539adca76be49c23459d0e2989528240f8f647d41d176650ffba1f3d0e7d0 0.0s
=> [internal] load build context 0.0s
=> => transferring context: 1.27kB 0.0s
=> [rac-image-slim-false 1/2] COPY setupLinuxEnv.sh setupGrid.sh setupDB.sh checkSpace.sh /opt/scripts/install/ 0.1s
=> [rac-image-slim-false 2/2] RUN chmod 755 "/opt/scripts/install"/.sh && sync && /opt/scripts/install/checkSpace.sh && /opt/scripts/install/setupLi 54.2s
=> [builder 1/4] COPY fixupPreq.sh grid_sw_install_21c.rsp applyGridPatch.sh GridHomeCleanup.sh OracleHomeCleanup.sh db_sw_install_21c.rsp installDBBinaries.sh en 14.4s
=> [final 1/5] COPY fixupPreq.sh /opt/scripts/install/ 0.1s
=> [final 2/5] COPY runOracle.sh initsh AddNode.sh grid_addnode_21c.rsp setupSSH.expect functions.sh configGrid.sh gridsetup_21c.rsp dbca_21c.rsp setPassword.sh ch 0.6s
=> [builder 2/4] RUN chmod 755 "/opt/scripts/install"/
.sh 0.4s
=> ERROR [builder 3/4] RUN if [ "falsex" != 'truex' ]; then sed -e '/hard *memlock/s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-21c.conf && 58.7s

[builder 3/4] RUN if [ "falsex" != 'truex' ]; then sed -e '/hard *memlock/s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-21c.conf && sed -e '/ *nofile /s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-21c.conf && su grid -c "/opt/scripts/install/installGridBinaries.sh EE $PATCH_NUMBER" && /u01/app/oraInventory/orainstRoot.sh && /u01/app/21.3.0/grid/root.sh && su oracle -c "/opt/scripts/install/installDBBinaries.sh EE" && su oracle -c "/opt/scripts/install/enableRAC.sh" && /u01/app/oraInventory/orainstRoot.sh && /u01/app/oracle/product/21.3.0/dbhome_1/root.sh && su grid -c "/opt/scripts/install/GridHomeCleanup.sh" && su oracle -c "/opt/scripts/install/OracleHomeCleanup.sh" && :; fi:
47.64 Launching Oracle Grid Infrastructure Setup Wizard...
47.64
58.11 [FATAL] [INS-40937] The following hostnames are invalid:buildkitsandbox
58.11 CAUSE: The hostname or names listed are invalid.
58.11 ACTION: Ensure that you are not providing aliases, and that the hostnames you provide are valid.
58.13 Moved the install session logs to:
58.13 /u01/app/oraInventory/logs/GridSetupActions2023-12-11_12-24-28PM
58.54 /bin/sh: /u01/app/oraInventory/orainstRoot.sh: No such file or directory


Dockerfile:174

173 | # hadolint ignore=SC2086
174 | >>> RUN if [ "${SLIMMING}x" != 'truex' ]; then
175 | >>> sed -e '/hard *memlock/s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-21c.conf &&
176 | >>> sed -e '/ *nofile /s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-21c.conf &&
177 | >>> su $GRID_USER -c "$INSTALL_DIR/install/$INSTALL_GRID_BINARIES_FILE EE $PATCH_NUMBER" &&
178 | >>> $INVENTORY/orainstRoot.sh &&
179 | >>> $GRID_HOME/root.sh &&
180 | >>> su $DB_USER -c "$INSTALL_DIR/install/$INSTALL_DB_BINARIES_FILE EE" &&
181 | >>> su $DB_USER -c "$INSTALL_DIR/install/$ENABLE_RAC_FILE" &&
182 | >>> $INVENTORY/orainstRoot.sh &&
183 | >>> $DB_HOME/root.sh &&
184 | >>> su $GRID_USER -c "$INSTALL_SCRIPTS/$GRID_HOME_CLEANUP" &&
185 | >>> su $DB_USER -c "$INSTALL_SCRIPTS/$ORACLE_HOME_CLEANUP" &&
186 | >>> :;
187 | >>> fi
188 |

ERROR: failed to solve: process "/bin/sh -c if [ "${SLIMMING}x" != 'truex' ]; then sed -e '/hard *memlock/s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-21c.conf && sed -e '/ *nofile /s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-21c.conf && su $GRID_USER -c "$INSTALL_DIR/install/$INSTALL_GRID_BINARIES_FILE EE $PATCH_NUMBER" && $INVENTORY/orainstRoot.sh && $GRID_HOME/root.sh && su $DB_USER -c "$INSTALL_DIR/install/$INSTALL_DB_BINARIES_FILE EE" && su $DB_USER -c "$INSTALL_DIR/install/$ENABLE_RAC_FILE" && $INVENTORY/orainstRoot.sh && $DB_HOME/root.sh && su $GRID_USER -c "$INSTALL_SCRIPTS/$GRID_HOME_CLEANUP" && su $DB_USER -c "$INSTALL_SCRIPTS/$ORACLE_HOME_CLEANUP" && :; fi" did not complete successfully: exit code: 127
There was an error building the image.
root@jhlee-vm-ubuntu:~/oracle/rac/OracleRealApplicationClusters/dockerfiles#

@oraclesean
Copy link

@ljkoy26-desktop the build error here is complaining about the host name buildkitsandbox:

[builder 3/4] RUN if [ "falsex" != 'truex' ]; then sed -e '/hard *memlock/s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-21c.conf && sed -e '/ *nofile /s/^/#/g' -i /etc/security/limits.d/oracle-database-preinstall-21c.conf && su grid -c "/opt/scripts/install/installGridBinaries.sh EE $PATCH_NUMBER" && /u01/app/oraInventory/orainstRoot.sh && /u01/app/21.3.0/grid/root.sh && su oracle -c "/opt/scripts/install/installDBBinaries.sh EE" && su oracle -c "/opt/scripts/install/enableRAC.sh" && /u01/app/oraInventory/orainstRoot.sh && /u01/app/oracle/product/21.3.0/dbhome_1/root.sh && su grid -c "/opt/scripts/install/GridHomeCleanup.sh" && su oracle -c "/opt/scripts/install/OracleHomeCleanup.sh" && :; fi:
47.64 Launching Oracle Grid Infrastructure Setup Wizard...
47.64
58.11 [FATAL] [INS-40937] The following hostnames are invalid:buildkitsandbox
58.11 CAUSE: The hostname or names listed are invalid.
58.11 ACTION: Ensure that you are not providing aliases, and that the hostnames you provide are valid.

Typically, this error occurs because the hostname doesn't match the public network name. I didn't see the build command used, so be sure you're following the instructions.

Alternately you can pull a 21c image directly from the Oracle Container Registry.

@saurabhuja
Copy link
Member

saurabhuja commented Dec 12, 2023

Issue here is that you are using latest version of docker where buildx is by default enabled, you may have downloaded this as binary from outside yum repo but latest docker engine version in yum repo for Oracle Linux 7 is here docker. It is tested to be working with it and its not enabled buildx here by default. Can you please try with it and confirm if same issue is coming for this version? You need to enable this developer repo from yum config before installation.

@ljkoy26-desktop
Copy link
Author

Thank you for your help. However, based on the answers you provided, we will share the build environment and settings.

1.hostname
2. The docker build script actually used
3. docker login (pull error)

■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
hostname lookup
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

The hostname I used is below.

root@jhlee-vm-ubuntu:~# hostname
jhlee-vm-ubuntu

■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
build container image Attempted build script
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

The commands executed to build rac are as follows. (Error 19c and 21c are the same in Dockerfile 174.)

./buildContainerImage.sh -v 21.3.0 -o '--build-arg BASE_OL_IMAGE=oraclelinux:7 --build-arg SLIMMING=false'
./buildContainerImage.sh -v 19.3.0 -o '--build-arg BASE_OL_IMAGE=oraclelinux:7 --build-arg SLIMMING=false'

As shown in the log above, the grid_home and db_home files are located in the path below.

"/root/oracle/rac/OracleRealApplicationClusters/dockerfiles/21.3.0/LINUX.X64_213000_grid_home.zip"
"/root/oracle/rac/OracleRealApplicationClusters/dockerfiles/21.3.0/LINUX.X64_213000_db_home.zip"

"/root/oracle/rac/OracleRealApplicationClusters/dockerfiles/19.3.0/LINUX.X64_193000_grid_home.zip"
"/root/oracle/rac/OracleRealApplicationClusters/dockerfiles/19.3.0/LINUX.X64_193000_db_home.zip"

Also, none of the Pull commands below work.
(docker login, docker login container-registry.oracle.com: I used an Oracle account and it was Success normally)
Do I need any other permissions to get the built oracle rac docker image?

■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
docker login log
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

root@jhlee-vm-ubuntu:~# docker login
Authenticating with existing credentials...
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded
root@jhlee-vm-ubuntu:~# docker login container-registry.oracle.com
Authenticating with existing credentials...
WARNING! Your password will be stored unencrypted in /root/.docker/config.json.
Configure a credential helper to remove this warning. See
https://docs.docker.com/engine/reference/commandline/login/#credentials-store

Login Succeeded

■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■
docker rac image pull error log
■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■

docker pull container-registry.oracle.com/database/rac:latest
Error response from daemon: pull access denied for container-registry.oracle.com/database/rac, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

docker pull container-registry.oracle.com/database/rac:21.3.0.0
Error response from daemon: pull access denied for container-registry.oracle.com/database/rac, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

docker pull container-registry.oracle.com/database/rac:19.3.0
Error response from daemon: pull access denied for container-registry.oracle.com/database/rac, repository does not exist or may require 'docker login': denied: requested access to the resource is denied

@ljkoy26-desktop
Copy link
Author

The issue with docker pull has been resolved.

I didn't know if I had to agree to the terms and conditions.

Also, I haven't tried the comment you gave regarding yum repo because I don't quite understand it yet.

@saurabhuja
Copy link
Member

Well this repo is tested with Oracle Linux 7 for RAC on Docker setup. Ubuntu is not supported and tested yet. Can you please procure Oracle Linux 7 machine and try from there as documented ?

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

3 participants