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
760
212
2 weeks ago 00:03:47 1
SCOOTER - HOW MUCH IS THE FISH (Metal cover)
2 weeks ago 00:20:57 1
Incredible Discovery In The Grand Canyon? - YouTube
2 weeks ago 00:29:11 1
Interview with Valentin Kozlov, Valmix Company | Potato Tour Across Russia (Part 2) π₯π
2 weeks ago 00:57:54 1
Lost In Time : The Isolated House Where She Lost Her Mind | How I Find Abandoned Placess
2 weeks ago 01:01:39 1
TIME SLIP STORIES (SN 18 EP 38) TRUE UNEXPLAINABLE EXPERIENCES WITH MISSING TIME & TIME SLIPS
2 weeks ago 00:00:31 2
How To Train Your Dragon | Big Game Spot
2 weeks ago 00:05:05 59
How to Clown - Misha Usov - Professional Clown School
2 weeks ago 00:38:45 2
Try Not To Laugh Challenge#7 | Instant Regret Fails Compilation 2024 | Amazing People