Oracle 11g xe in debian

Hi!

I installed Oracle using this tutorial: https://hub.docker.com/r/alexeiled/docker-oracle-xe-11g/
I can run Oracle using command docker run -d --shm-size=2g -p 1521:1521 -p 8080:8080 alexeiled/docker-oracle-xe-11g
and I am able to open Oracle page http://10.50.10.159:8080/apex and change admin password.
Unfortunately every time when I restart this docker container or whole server, new password is not stored.

I configured it also to autostart: docker run --restart=always -d --shm-size=2g -p 1521:1521 -p 8080:8080 alexeiled/docker-oracle-xe-11g expecting to have the same instance of container, but password is default every time.

I’m so new in docker. Am I doing something wrong? Or it is this docker oracle container issue?

Thanks in advance!

I think I found reason :slight_smile: I read a little Docker documentation and if I’m not wrong, after every restart I see different docker ID:

# docker ps
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS                                            NAMES
9600303ecddd        alexeiled/docker-oracle-xe-11g   "/bin/sh -c /start.sh"   28 seconds ago      Up 26 seconds       0.0.0.0:1521->1521/tcp, 0.0.0.0:8080->8080/tcp   gifted_williams

# docker ps
CONTAINER ID        IMAGE                            COMMAND                  CREATED             STATUS              PORTS                                            NAMES
13d723a024b6        alexeiled/docker-oracle-xe-11g   "/bin/sh -c /start.sh"   2 hours ago         Up 28 seconds       0.0.0.0:1521->1521/tcp, 0.0.0.0:8080->8080/tcp   kind_stallman

So, after reboot it is creating new docker container based on default image.
How can I change this behavior?

I made some workaround using command:
docker start 9600303ecddd
in crontab @reboot but is there some nice docker way to autostart it?

You can try to name the container with the --name <your_name> option.