Installing Oracle XE 11g with Docker

Byul·2023년 6월 8일

Oracle

목록 보기
1/1

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:

Step 1: Pull the Oracle XE 11g Docker Image

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-11g

This command downloads the Docker image from the Docker Hub repository. It may take some time depending on your internet connection speed.

Step 2: Run the Oracle XE 11g Container

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.

Step 3: Access Oracle XE 11g

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:

  1. Open your preferred database client tool (e.g., Oracle SQL Developer, SQL*Plus).
  2. Set up a new database connection with the following details:
    • 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.

Additional Notes

  • 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
profile
junior backend developer

0개의 댓글