postgre docker-compose.ymlとして使用
472 ワード
docker-compose.ymlを使用しない場合は、以下のようにコードを書くたびに作成できます.
$ docker run -p 5432:5432 --name postgres -e POSTGRES_PASSWORD=1q2w3e4r -d postgres
docker-compose.ymlファイルには、次のコードが記述されます.postgres:
image: postgres:11.10-alpine
container_name: postgres
hostname: postgres
ports:
- 5432:5432
restart: always
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
Reference
この問題について(postgre docker-compose.ymlとして使用), 我々は、より多くの情報をここで見つけました https://velog.io/@song22861/postgre-docker-compose.yml로-사용하기テキストは自由に共有またはコピーできます。ただし、このドキュメントのURLは参考URLとして残しておいてください。
Collection and Share based on the CC Protocol