I showcase how we can create a docker container running a PostgreSQL Database. We then add some SQL to the database, and go into the container to access the database to check everything works as intended.
Dockerfile:
FROM postgres
ENV POSTGRES_PASSWORD docker
ENV POSTGRES_DB user
COPY /docker-entrypoint-initdb.d/
Commands:
Build docker image:
docker build -t dbpost .
Run doker contianer from image:
docker run -d --name my-postgresdb-container -p 5432:5432 dbpost
Get into the docker container:
docker exec -it [container id] /bin/bash
Get into postgreSQL:
psql -U postgress
My channel publishes programming and software engineering videos, especially Java and Python. If that is what you are looking for, do not hesitate to join me on this journey!
Subscribe to my YouTube channel:
0:00 Intro
0:35 Dockerfile
1:14 Docker build
8 views
579
165
4 weeks ago 00:05:17 1
The Ultimate Email Extractor in 2024: YellowPages Scraper 🌎
4 weeks ago 00:03:55 1
Pokemon GO Joystick, Teleport, Auto Walk - How to Get Pokemon GO Spoofer iOS & Android 2024 FREE
4 weeks ago 00:12:05 1
ZenBusiness Review 2024: What Makes It Stand Out?
4 weeks ago 00:04:14 1
Paramore: Decode [OFFICIAL VIDEO]
4 weeks ago 02:01:18 1
Half-Life 2: 20th Anniversary Documentary
4 weeks ago 00:36:24 3
Best of the Worst Trivia!
4 weeks ago 00:03:07 1
Delta Executor iOS iPhone Android NO KEY - Roblox Script Executor Mobile NEW UPDATE 2024
4 weeks ago 00:03:04 1
Bach, Organ Sonata No. 4 in E minor (BWV 528) 3. Un poco Allegro.
4 weeks ago 00:04:49 1
Play To Earn🔥This New Play to Earn Game is About to Make a Lot of People RICH
1 month ago 00:03:04 1
Arena Of Valor Hack - How to Get Unlimited Vouchers! iOS Android