Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://hub.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/get-started/
추가 정보
docker 설치 시 docker-compose가 같이 설치되는데 docker-compose 명령어는 /usr/libexec/docker/cli-plugins/docker-compose 라는 요상한 곳에 설치가 됨
해당 path를 $PATH에 추가해도 좋겠지만...
난 그냥 /usr/local/bin 에 심볼릭 링크 추가함
root@Ubuntu24:~# dpkg -L docker-compose-plugin
/.
/usr
/usr/libexec
/usr/libexec/docker
/usr/libexec/docker/cli-plugins
/usr/libexec/docker/cli-plugins/docker-compose
/usr/share
/usr/share/doc
/usr/share/doc/docker-compose-plugin
/usr/share/doc/docker-compose-plugin/changelog.Debian.gz
root@Ubuntu24:~# ls -al /usr/local/bin/
total 8
drwxr-xr-x 2 root root 4096 Nov 25 23:48 .
drwxr-xr-x 10 root root 4096 May 7 2024 ..
lrwxrwxrwx 1 root root 46 Nov 25 23:48 docker-compose -> /usr/libexec/docker/cli-plugins/docker-compose
root@Ubuntu24:~# docker-compose --help
Usage: docker compose [OPTIONS] COMMAND
Define and run multi-container applications with Docker
Options:
--all-resources Include all resources, even those not used by services
--ansi string Control when to print ANSI control characters
("never"|"always"|"auto") (default "auto")
--compatibility Run compose in backward compatibility mode
--dry-run Execute command in dry run mode
--env-file stringArray Specify an alternate environment file
-f, --file stringArray Compose configuration files
--parallel int Control max parallelism, -1 for unlimited (default -1)
--profile stringArray Specify a profile to enable
--progress string Set type of progress output (auto, tty, plain, json,
quiet) (default "auto")
--project-directory string Specify an alternate working directory
(default: the path of the, first specified, Compose file)
-p, --project-name string Project name
Commands:
attach Attach local standard input, output, and error streams to a service's running container
build Build or rebuild services
config Parse, resolve and render compose file in canonical format
cp Copy files/folders between a service container and the local filesystem
create Creates containers for a service
down Stop and remove containers, networks
events Receive real time events from containers
exec Execute a command in a running container
images List images used by the created containers
kill Force stop service containers
logs View output from containers
ls List running compose projects
pause Pause services
port Print the public port for a port binding
ps List containers
pull Pull service images
push Push service images
restart Restart service containers
rm Removes stopped service containers
run Run a one-off command on a service
scale Scale services
start Start services
stats Display a live stream of container(s) resource usage statistics
stop Stop services
top Display the running processes
unpause Unpause services
up Create and start containers
version Show the Docker Compose version information
wait Block until containers of all (or specified) services stop.
watch Watch build context for service and rebuild/refresh containers when files are updated
Run 'docker compose COMMAND --help' for more information on a command.
root@Ubuntu24:~#
Docker 컨테이너에서 실행 중인 PostgreSQL 데이터베이스를 pgAdmin을 통해 관리하는 방법을 단계별로 안내해드릴게요:
1. **pgAdmin Docker 이미지 다운로드**: ```bash docker pull dpage/pgadmin4 ```
2. **pgAdmin 컨테이너 실행**: ```bash docker run --name pgadmin-container -p 5050:80 \ -e PGADMIN_DEFAULT_EMAIL=your-email@example.com \ -e PGADMIN_DEFAULT_PASSWORD=your-password \ -d dpage/pgadmin4 ``` 여기서 `your-email@example.com`과 `your-password`는 pgAdmin에 로그인할 때 사용할 이메일 주소와 비밀번호로 설정해주세요.
3. **브라우저에서 pgAdmin 접속**: - 브라우저를 열고 `http://localhost:5050`으로 접속합니다. - 앞서 설정한 이메일 주소와 비밀번호로 로그인합니다.
4. **PostgreSQL 서버 추가**: - pgAdmin에 로그인한 후, 왼쪽 상단의 "Add New Server" 버튼을 클릭합니다. - 서버 이름을 입력하고, "Connection" 탭으로 이동합니다. - 다음 정보를 입력합니다: - **Host name/address**: PostgreSQL 컨테이너의 IP 주소 (예: `172.17.0.2`) - **Port**: 5432 (기본 포트) - **Maintenance database**: postgres - **Username**: postgres (기본 사용자 이름) - **Password**: PostgreSQL 설정 시 사용한 비밀번호
5. **서버 연결 확인**: - 모든 정보를 입력한 후 "Save" 버튼을 클릭합니다. - 이제 pgAdmin을 통해 Docker 컨테이너에서 실행 중인 PostgreSQL 데이터베이스에 접속할 수 있습니다.