If you haven't installed Docker yet, you can follow the guide here to install Docker on Windows. Once Docker is installed, you can proceed with the following steps:
Open a terminal or PowerShell with administrator privileges. You can search for "PowerShell" in the Start menu, right-click on it, and choose "Run as administrator".
In the PowerShell window, run the following command to pull the Oracle XE 11g Docker image:
docker pull jaspeen/oracle-xe-11gThis command downloads the Docker image from the Docker Hub repository. It may take some time depending on your internet connection speed.
Once the Docker image is downloaded, you can create and run a container based on that image. In the same PowerShell window, run the following command:
docker run --name oracle11g -d -p 1521:1521 jaspeen/oracle-xe-11g
--name oracle11g: Specifies the name for the container (you can choose any name you prefer).-d: Runs the container in the background (detached mode).-p 1521:1521: Maps the container's port 1521 (Oracle XE default port) to the same port on the host machine.
After executing the command, Docker will create and start a new container named oracle11g based on the Oracle XE 11g Docker image. The container will be running in the background.
Now that the container is up and running, you can access Oracle XE 11g using a database client tool. Here's how you can connect to the Oracle database:
- Hostname: localhost
- Port: 1521
- SID: xe
- Username: system
- Password: oracle
Once you have entered the connection details, click on the "Connect" or "OK" button to establish a connection to the Oracle XE 11g database running in the Docker container.
Congratulations! You have successfully installed Oracle XE 11g using Docker. You can now start using Oracle XE 11g for your development or testing purposes.
To stop the running container, you can use the following command:
docker stop oracle11g
To start the container again, use the following command:
docker start oracle11g
If you want to remove the container, you can run the following command:
docker rm oracle11g
If you want to remove the Oracle XE 11g Docker image from your system, use the following command:
docker rmi jaspeen/oracle-xe-11g