Docker build: Problems with rpmdb

Hello,

i try to build the following docker image on a Oracle Linux 7.5 VM:

FROM oraclelinux:6
ADD local_ol6.repo /etc/yum.repos.d/
RUN rm -f /etc/yum.repos.d/public*
RUN yum -y groupinstall "Base" "Core" "Compatibility libraries" "Hardware monitoring utilities" "Large Systems Performance" "Network file system client" "Performance Tools" "Perl Support" "Server Platform" "System administration tools" "Additional Development" "Development Tools"
RUN yum -y update
RUN yum -y install expat
RUN yum -y install expat-devel
RUN rm -f /etc/yum.repos.d/public*

content of local_ol6.repo:

[local_ol6]
name=OL6 Packages from ULN
baseurl=http://mylocalmirror/OracleLinux/OL6/latest/$basearch
gpgcheck=0
enabled=1

[local_ol6_uek4]
name=Oracle Linux $releasever UEK4 Kernel ($basearch)
baseurl=http://mylocalmirror/OracleLinux/OL6/UEKR4/$basearch
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-oracle
gpgcheck=0
enabled=1

It works well, until:

[...]
Complete!
Removing intermediate container 0d1e5a86c7e8
 ---> e928268c525b
Step 6/9 : RUN yum -y update
 ---> Running in febc8bcfffdb
rpmdb: unable to join the environment
The command '/bin/sh -c yum -y update' returned a non-zero code: 139
ERROR: Job failed: exit status 1

If i start the container manually, everything works well:

docker run -i -t -d --name oraclelinux6 oraclelinux:6
docker exec -it oraclelinux6 bash
[...]

So there is no issue with the docker system itself, i am right?

Infos:

docker info:

Containers: 0
 Running: 0
 Paused: 0
 Stopped: 0
Images: 2
Server Version: 18.06.1-ce
Storage Driver: devicemapper
 Pool Name: docker-8:5-1344044353-pool
 Pool Blocksize: 65.54kB
 Base Device Size: 10.74GB
 Backing Filesystem: xfs
 Udev Sync Supported: true
 Data file: /dev/loop0
 Metadata file: /dev/loop1
 Data loop file: /data/docker/devicemapper/devicemapper/data
 Metadata loop file: /data/docker/devicemapper/devicemapper/metadata
 Data Space Used: 977.3MB
 Data Space Total: 107.4GB
 Data Space Available: 106.4GB
 Metadata Space Used: 2.171MB
 Metadata Space Total: 2.147GB
 Metadata Space Available: 2.145GB
 Thin Pool Minimum Free Space: 10.74GB
 Deferred Removal Enabled: true
 Deferred Deletion Enabled: true
 Deferred Deleted Device Count: 0
 Library Version: 1.02.146-RHEL7 (2018-01-22)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
 Volume: local
 Network: bridge host 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.1.12-124.18.6.el7uek.x86_64
Operating System: Oracle Linux Server 7.5
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 31.42GiB
Name: ro-build-s01.online.rwth-aachen.de
ID: AE3Y:MVMW:C52N:UBX6:4SJC:FJZI:YZOG:YJNR:RCAY:G62F:ANUK:OX47
Docker Root Dir: /data/docker
Debug Mode (client): false
Debug Mode (server): false
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
 127.0.0.0/8
Live Restore Enabled: false

WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
         Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.

docker version

Client:
 Version:           18.06.1-ce
 API version:       1.38
 Go version:        go1.10.3
 Git commit:        e68fc7a
 Built:             Tue Aug 21 17:23:03 2018
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.06.1-ce
  API version:      1.38 (minimum version 1.12)
  Go version:       go1.10.3
  Git commit:       e68fc7a
  Built:            Tue Aug 21 17:25:29 2018
  OS/Arch:          linux/amd64
  Experimental:     false

Any ideas what’s going wrong here?

Thanks in advance