Building Oracle XE docker image in Windows 10 Pro
Use Wsl Ubuntu Bash set path to Docker executables or simply install Git Bash for Windows from Docker Tools and run the shell script from Git Bash terminal(I prefer Git Bash).Download and Copy Oracle18xe rpm file to 18.40 folder

This is output from Git Bash for windows

 xxx@localhost MINGW64 /d/docker-images/OracleDatabase/SingleInstance/dockerfiles/18.4.0 (master)                                                                                                                                                                                              
    $ ls -lrt
    total 2513906
    -rw-r--r-- 1 user 197121         74 Dec 28 13:17 Checksum.xe
    -rw-r--r-- 1 user 197121       2675 Dec 28 13:17 Dockerfile.xe
    -rwxr-xr-x 1 user 197121       1137 Dec 28 13:17 checkDBStatus.sh*
    -rwxr-xr-x 1 user 197121        905 Dec 28 13:17 checkSpace.sh*
    -rw-r--r-- 1 user 197121        533 Dec 28 13:17 oracle-xe-18c.conf
    -rwxr-xr-x 1 user 197121       6132 Dec 28 13:17 runOracle.sh*
    -rwxr-xr-x 1 user 197121        775 Dec 28 13:17 setPassword.sh*
    -rw-r--r-- 1 user 197121 2574155124 Dec 28 13:48 oracle-database-xe-18c-1.0-1.x86_64.rpm


After running shell script successfully

xxx@localhost MINGW64 /d/docker-images/OracleDatabase/SingleInstance/dockerfiles/18.4.0 (master)
$ docker image ls
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
oracle/database     18.4.0-xe           19b38be42ae6        30 minutes ago      8.44GB
oraclelinux         7-slim              0d49b70bc432        9 days ago          118MB

xxx@localhost MINGW64 /d/docker-images/OracleDatabase/SingleInstance/dockerfiles (master)
$ docker run --name myxedb \
&gt;     -d \
&gt;     -p 51521:1521 \
&gt;     -p 55500:5500 \
&gt;     -e ORACLE_PWD=xxxxxxx \
&gt;     -e ORACLE_CHARACTERSET=AL32UTF8 \
&gt;     oracle/database:18.4.0-xe


xxx@localhost MINGW64 /d/docker-images/OracleDatabase/SingleInstance/dockerfiles/18.4.0 (master)
$ docker ps
CONTAINER ID        IMAGE                       COMMAND                  CREATED             STATUS                             PORTS                                                        NAMES
afce013adb98        oracle/database:18.4.0-xe   "/bin/sh -c 'exec $O…"   19 seconds ago      Up 16 seconds (health: starting)   8080/tcp, 0.0.0.0:51521-&gt;1521/tcp, 0.0.0.0:55500-&gt;5500/tcp   myxedb


You can connect to database via sqlplus or login into docker container using Windows Dos

    D:\&gt;docker exec -it --user=oracle myxedb bash


[oracle@afce013adb98 /]$ . oraenv
ORACLE_SID = [XE] ?
The Oracle base remains unchanged with value /opt/oracle



[oracle@afce013adb98 /]$ sqlplus / as sysdba

    SQL*Plus: Release 18.0.0.0.0 - Production on Sun Dec 29 05:04:32 2019
    Version 18.4.0.0.0

    Copyright (c) 1982, 2018, Oracle.  All rights reserved.


    Connected to:
    Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
    Version 18.4.0.0.0

    SQL&gt; select banner from v$version;

    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production



  P.S:-Make sure you logged into docker hub from git bash terminal
  docker login


To use WSL subsystem bash terminal add path and alias to .bashrc

export PATH="$HOME/bin:$HOME/.local/bin:/mnt/c/Program\Files/Docker/Docker/resources/bin:$PATH"
alias docker=docker.exe
alias docker-compose=docker-compose.exe


From WSL Bash terminal

xxxx@localhost:~# docker -v
Docker version 19.03.8, build afacb8b