```
Docker를 활용한 pgAdmin 설정하기
```
이번 글을 통해 배워갈 내용
- Docker Compose 파일 작성하기
- pgAdmin 실행하기
- db 추가하기
Docker Compose 파일 작성하기
먼저 도커 컴포즈가 없으시다면
아래 링크를 보고 설치해 주시면 됩니다
https://codemasterkimc.tistory.com/689
Docker Compose 파일을 작성해 줍니다
version: "3"
services:
pgadmin:
image: dpage/pgadmin4:latest
container_name: pgadmin-container
ports:
- "5050:80"
environment:
- PGADMIN_DEFAULT_EMAIL=admin@example.com
- PGADMIN_DEFAULT_PASSWORD=admin123
필요시 volume도 설정해줍니다
volumes: - ./data/pgadmin/:/var/lib/pgadmin
PgAdmin 실행하기
터미널에서
Docker Compose 파일이 있는 디렉터리로 이동한 후
아래 명령어를 실행합니다
docker-compose up -d
pgAdmin이 Docker에서 실행된 다음
(컴퓨터 사양에 따라 5초 정도 소요됩니다)
브라우저에서 http://localhost:5050으로 접속하여
설정한 이메일과 비밀번호로 로그인합니다
DB 추가하기
Register > Server로 서버를 추가합니다
기존 설치형 버전과 달리
컨테이너 버전은
localhost
127.0.0.1로는 추가가 안 돼서
ipconfig로 컴퓨터 주소를 찾아서 진행했습니다
읽어주셔서 감사합니다
무엇인가 얻어가셨기를 바라며
오늘도 즐거운 코딩 하시길 바랍니다 ~ :)
참조 및 인용
https://www.pgadmin.org/docs/pgadmin4/latest/index.html
pgAdmin 4 — pgAdmin 4 8.2 documentation
Welcome to pgAdmin 4. pgAdmin is the leading Open Source management tool for Postgres, the world’s most advanced Open Source database. pgAdmin 4 is designed to meet the needs of both novice and experienced Postgres users alike, providing a powerful graph
www.pgadmin.org
https://hub.docker.com/r/dpage/pgadmin4
Docker
hub.docker.com
https://stackoverflow.com/questions/25540711/docker-postgres-pgadmin-local-connection
docker postgres pgadmin local connection
I have created an ubuntu image with nginx, php and postgres. I want to connect the postgres database in my current image with pgadmin located on my local machine. I have tried using docker inspe...
stackoverflow.com
https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html
Container Deployment — pgAdmin 4 8.2 documentation
There are various tags that you can select from to get the version of pgAdmin that you want, using a command such as this if you’re using Docker: PostgreSQL Utilities The PostgreSQL utilities pg_dump, pg_dumpall, pg_restore and psql are included in the c
www.pgadmin.org
'DevOps > Docker' 카테고리의 다른 글
Docker Compose volume 권한 문제 해결: WSL을 활용한 효과적인 해결 방법 (0) | 2024.01.18 |
---|---|
도커 컨테이너 통신의 3가지 사례 설명 (0) | 2023.12.10 |
우분투에 도커 컴포스 설치 하는 한가지 방법 (0) | 2023.11.22 |
Docker Nginx Certbot SSL 인증서 받는 1가지 방법 (0) | 2023.11.21 |
그랄VM(Graalvm) Spring Boot Mssql 세팅하는 방법 (윈도우OS) (0) | 2023.11.10 |