Skip to content

Instantly share code, notes, and snippets.

@MattPorto
Last active March 19, 2026 00:01
Show Gist options
  • Select an option

  • Save MattPorto/06104833f7c88f5c459e97e5fdf0a682 to your computer and use it in GitHub Desktop.

Select an option

Save MattPorto/06104833f7c88f5c459e97e5fdf0a682 to your computer and use it in GitHub Desktop.
Oracle DB Local Setup With Docker + WSL 2 + Oracle SQL Developer

Assuming you already have WSL 2 configured and Docker Desktop for Windows installed:

  1. Download the image gvenzl/oracle-free from docker's hub
  2. Configure your Docker Desktop app to integrate with WSL
  3. Go to the WSL and create a docker-compose.yml with the following:
services:
  oracle-db:
    image: gvenzl/oracle-free:latest
    container_name: oracle-db
    ports:
      - "1521:1521"
    environment:
      - ORACLE_PASSWORD=ANY-PASSWORD-HERE
    volumes:
      - oracle_data:/opt/oracle/oradata

volumes:
  oracle_data:

Now you can run your DB container by running docker up -d, and you should see your new container on the Docker Desktop.

I recommend starting/stopping the container using Docker Desktop, so you don't need to open WSL any time you want to start it.

To connect it to the Oracle SQL Developer, you can go to it and create a new db connection passing the following:

  • Host: localhost
  • Port: 1521
  • User: system
  • Password: the one you've defined in the docker-compose.yml
  • Service Name: Usually it is FREEPDB1 or XE

Click in test connection, then save it if it's working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment