0

I am running Oracle Database in a docker container with the following command:

sudo docker run -d -it –rm –name oracle19se -v /home/oracle/oradata19c:/opt/oracle/oradata -p 1521:1521 -p 5500:5500 oracle/database:19.2.0-ee

and getting the following error message similar to the one described here:

docker: invalid reference format.

What can be wrong with the command syntax? I have an impression that previously (probably before my Ubuntu 18.04 update) this command worked fine.

the image I am trying to run:

REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
oracle/database      19.2.0-ee           afc10cf87f83        2 months ago        6.34GB

Other 'run' commands like these, for example:

sudo docker run -d -it --rm --name oracle18se -v /home/oracle/oradata18:/opt/oracle/oradata -p 1521:1521 -p 5500:5500 oracle/database-se:18.3.0
sudo docker run -d -it –rm –name oracle12se -v /home/oracle/oradata12:/opt/oracle/oradata -p 1521:1521 -p 5500:5500 oracle/database-se:12.2.0.1

works fine. What is the difference? The list of all my images:

REPOSITORY           TAG                 IMAGE ID            CREATED             SIZE
oracle/database      19.2.0-ee           afc10cf87f83        2 months ago        6.34GB
oracle/database-se   12.2.0.1            83dd2e26f291        4 months ago        6.1GB
oracle/database-se   18.3.0              c26bfe962137        4 months ago        8.53GB
oracle/database      18.3.0              493b0fcf7c08        4 months ago        8.49GB
oraclelinux          7-slim              c3d869388183        6 months ago        117MB
Alexey Starinsky
  • 3,699
  • 3
  • 21
  • 57

1 Answers1

2

Your double dashes on rm and name got converted into a different hyphen character, likely by whatever editor you are using. Those are not valid and docker tries to parse –rm as an image name. This is not a valid syntax/format for an image name, and it cannot resolve the reference to an image to pull. Instead run the following:

sudo docker run -d -it --rm --name oracle19se -v /home/oracle/oradata19c:/opt/oracle/oradata -p 1521:1521 -p 5500:5500 oracle/database:19.2.0-ee
BMitch
  • 231,797
  • 42
  • 475
  • 450