all InfoSec news
Run PostgreSQL in docker
March 23, 2024, 2:56 a.m. | theBridge2
DEV Community dev.to
1) Setting up
Get docker
https://www.docker.com/get-docker
Go to terminal to prove the install succeeded.
docker --help
Get postgres image to use in docker.
https://hub.docker.com/_/postgres
docker pull postgres:alpine
This is the smallest postgres install image to use for testing.
2) Start docker postgres container
docker run --name any_image_name -e POSTGRES_PASSWORD=mypassword -d -p 5432:5432 postgres
-> -e creates an environment variable
-> -p 5432:5432 exposes port 5432 to external to the container
3) Test docker image with psql
alpine beginners container docker go to image install name postgres postgresql prove run start terminal testing webdev
More from dev.to / DEV Community
Jobs in InfoSec / Cybersecurity
CyberSOC Technical Lead
@ Integrity360 | Sandyford, Dublin, Ireland
Cyber Security Strategy Consultant
@ Capco | New York City
Cyber Security Senior Consultant
@ Capco | Chicago, IL
Sr. Product Manager
@ MixMode | Remote, US
Security Compliance Strategist
@ Grab | Petaling Jaya, Malaysia
Cloud Security Architect, Lead
@ Booz Allen Hamilton | USA, VA, McLean (1500 Tysons McLean Dr)