DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • Top 8 PostgreSQL GUI Software in 2021
  • 5 Key Postgres Advantages Over MySQL
  • Using Envoy Proxy’s PostgreSQL and TCP Filters to Collect Yugabyte SQL Statistics
  • GenAI: From Prompt to Production

Trending

  • Beyond Linguistics: Real-Time Domain Event Mapping with WebSocket and Spring Boot
  • Kubeflow: Driving Scalable and Intelligent Machine Learning Systems
  • Building Enterprise-Ready Landing Zones: Beyond the Initial Setup
  • Streamlining Event Data in Event-Driven Ansible
  1. DZone
  2. Data Engineering
  3. Databases
  4. How To Run the Latest Version of PostgreSQL Using Docker

How To Run the Latest Version of PostgreSQL Using Docker

One can rely on the PostgreSQL object-relational database system to ensure data integrity, making the workflow of DevOps Developers and Engineers more productive.

By 
Charles Ituah user avatar
Charles Ituah
·
May. 04, 23 · Tutorial
Likes (1)
Comment
Save
Tweet
Share
6.5K Views

Join the DZone community and get the full member experience.

Join For Free

What Is PostgreSQL?

PostgreSQL, commonly referred to as "Postgres," is an ORDBMS that prioritizes extensibility and adherence to standards. Its main purpose as a database server is to securely store data and retrieve it upon request from software applications, whether they are on the same machine or on a network. Postgres is capable of handling workloads of varying sizes, ranging from small single-machine applications to large, internet-facing applications with multiple users. Additionally, recent versions of Postgres offer database replication for enhanced security and scalability. 

PostgreSQL is a highly versatile database management system that adheres to the SQL:2011 standard and follows the ACID compliance model, which ensures reliable and accurate data transactions. It utilizes multi-version concurrency control (MVCC) to avoid locking issues and provides immunity to dirty reads and full serializability. PostgreSQL supports a wide range of SQL queries using advanced indexing methods not available in other databases. It also offers features such as updateable views, materialized views, triggers, foreign keys, support functions, and stored procedures. Furthermore, PostgreSQL is highly extensible and offers a plethora of third-party extensions. It can also migrate data from major proprietary and open-source databases using standard SQL support and migration tools. The software's extensibility allows it to emulate many proprietary extensions through built-in and third-party open-source compatibility extensions, such as those for Oracle.

How to Setup WSL2 and Install Docker Desktop on Windows 10

In order to properly configure Docker and get PostgreSQL to work, we need to follow a process:

  1. Search for Turn Windows features on or off
  2. Tick Windows Subsystem for Linux and Virtual Machine Platform
  3. Now restart the PC
  4. Open run and type winver to check the build version 
  5. To update to WSL 2, you must be running Windows 10
    • For x64 systems: Version 1903 or later, with Build 18362 or later.
    • For ARM64 systems: Version 2004 or later, with Build 19041 or later.
  6. Download the Linux kernel update package
  7. Open PowerShell and Set WSL 2 as your default version
PowerShell
 
wsl --set-default-version 2

     8.  Check the available valid Linux distribution by running this command in PowerShell.  

PowerShell
 
wsl -l -o

      9. Install your Linux distribution of choice. In this case, I chose Ubuntu 18.04.

PowerShell
 
wsl --install -d Ubuntu-18.04

     10. Run the Ubuntu terminal and enter your UNIX username and UNIX password
     11. Install Docker Desktop Installer 4.1.1 and run Docker to start the engine.


How To Install the Latest Version of PostgreSQL

  1. Go to Docker Hub
  2. Search for Postgres
  3. Select the official Docker Image of PostgreSQL
  4. Run this command to pull Postgres which will be the latest version
Dockerfile
 
docker pull postgres


How to Run PostgreSQL in Docker 4.11


    1. Start a Postgres instance by running this command

Dockerfile
 
docker run --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -d postgres

    2. Navigate to Docker, and Postgres should be up and running.

Open source Docker (software) PostgreSQL sql

Opinions expressed by DZone contributors are their own.

Related

  • Top 8 PostgreSQL GUI Software in 2021
  • 5 Key Postgres Advantages Over MySQL
  • Using Envoy Proxy’s PostgreSQL and TCP Filters to Collect Yugabyte SQL Statistics
  • GenAI: From Prompt to Production

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!