docker-oracle-xe
docker-oracle-xe copied to clipboard
Issue while building oracle18c-xe docker image.
Hi,
I'm trying to create a docker image for oracle 18c-xe. I'm following https://github.com/fuzziebrain/docker-oracle-xe
But I'm see following error.
docker build -t oracle-xe:18c . Sending build context to Docker daemon 2.574GB Step 1/10 : FROM oraclelinux:7-slim ---> 90e39322df71 Step 2/10 : ENV ORACLE_PASSWORD=Welcome1 EM_GLOBAL_ACCESS_YN=Y ORACLE_DOCKER_INSTALL=true ORACLE_SID=XE ORACLE_BASE=/opt/oracle ORACLE_HOME=/opt/oracle/product/18c/dbhomeXE ORAENV_ASK=NO RUN_FILE=runOracle.sh SHUTDOWN_FILE=shutdownDb.sh EM_REMOTE_ACCESS=enableEmRemoteAccess.sh EM_RESTORE=reconfigureEm.sh ORACLE_XE_RPM=oracle-database-xe-18c-1.0-1.x86_64.rpm CHECK_DB_FILE=checkDBStatus.sh ---> Using cache ---> 8e536a18a52e Step 3/10 : COPY ./files/${ORACLE_XE_RPM} /tmp/ ---> Using cache ---> e9b229f3b557 Step 4/10 : RUN yum install -y oracle-database-preinstall-18c && yum install -y /tmp/${ORACLE_XE_RPM} && rm -rf /tmp/${ORACLE_XE_RPM} ---> Running in 609f041d6956 Loaded plugins: ovl https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error" Trying other mirror.
One of the configured repositories failed (Latest Unbreakable Enterprise Kernel Release 5 for Oracle Linux 7Server (x86_64)), and yum doesn't have enough cached data to continue. At this point the only safe thing yum can do is fail. There are a few ways to work "fix" this:
1. Contact the upstream for the repository and get them to fix the problem.
2. Reconfigure the baseurl/etc. for the repository, to point to a working
upstream. This is most often useful if you are using a newer
distribution release than is supported by the repository (and the
packages for the previous distribution release still work).
3. Run the command with the repository temporarily disabled
yum --disablerepo=ol7_UEKR5 ...
4. Disable the repository permanently, so yum won't use it by default. Yum
will then just ignore the repository until you permanently enable it
again or use --enablerepo for temporary usage:
yum-config-manager --disable ol7_UEKR5
or
subscription-manager repos --disable=ol7_UEKR5
5. Configure the failing repository to be skipped, if it is unavailable.
Note that yum will try to contact the repo. when it runs most commands,
so will have to try and fail each time (and thus. yum will be be much
slower). If it is a very temporary problem though, this is often a nice
compromise:
yum-config-manager --save --setopt=ol7_UEKR5.skip_if_unavailable=true
failure: repodata/repomd.xml from ol7_UEKR5: [Errno 256] No more mirrors to try. https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64/repodata/repomd.xml: [Errno 14] curl#6 - "Could not resolve host: yum.oracle.com; Unknown error" The command '/bin/sh -c yum install -y oracle-database-preinstall-18c && yum install -y /tmp/${ORACLE_XE_RPM} && rm -rf /tmp/${ORACLE_XE_RPM}' returned a non-zero code: 1
But I'm able to access https://yum.oracle.com/repo/OracleLinux/OL7/UEKR5/x86_64/repodata/repomd.xml using Curl & browser.
Any assistance to resolve this issue will be a great help.
I'm running this on a mac.
Docker Info: Containers: 22 Running: 2 Paused: 0 Stopped: 20 Images: 45 Server Version: 18.06.1-ce Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Native Overlay Diff: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog Swarm: inactive Runtimes: runc Default Runtime: runc Init Binary: docker-init containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e runc version: 69663f0bd4b60df09991c08812a60108003fa340 init version: fec3683 Security Options: seccomp Profile: default Kernel Version: 4.9.93-linuxkit-aufs Operating System: Docker for Mac OSType: linux Architecture: x86_64 CPUs: 2 Total Memory: 5.818GiB Name: linuxkit-025000000001 ID: KF6U:3OVX:72BJ:KUYC:MTOW:32TU:2T5X:66FK:Y3WY:GXX5:ASE6:33VR Docker Root Dir: /var/lib/docker Debug Mode (client): false Debug Mode (server): false HTTP Proxy: gateway.docker.internal:3128 HTTPS Proxy: gateway.docker.internal:3129 Registry: https://index.docker.io/v1/ Labels: Experimental: true
I hit this problem too on a new centos 8 and docker environment. The issue seems to be that the default docker bridge network does not have internet access. To fix it, I build using the command:
docker build --network host -t oracle-xe:18c .
As a simple test before building, do:
docker run --rm -it alpine ping -c4 yum.oracle.com
You will likely get an error saying bad address. Try again adding the network:
docker run --network host --rm -it alpine ping -c4 yum.oracle.com
and this this you should get a response. I'd googled around and found lots of hits relating to containers not getting internet access, but none of the solutions wanted to work for me.