株式会社ヴァンデミックシステム

Blog

<スポンサーリンク>

「- ./volumes/postgres:/var/lib/postgresql/data」の部分を付け加える。
あと、とりあえず、./volumesはChmod777しておく

  postgres:
    build:
      context: ./
      dockerfile: ./postgres/Dockerfile
    ports:
      - 5432:5432
    environment:
      - POSTGRES_USER=root
      - POSTGRES_PASSWORD=password
    tty: true
    restart: always
    user: root
    volumes:
      - ./init:/docker-entrypoint-initdb.d
      - /etc/localtime:/etc/localtime:ro
      - ./volumes/postgres:/var/lib/postgresql/data

<スポンサーリンク>

コメントを残す

Allowed tags:  you may use these HTML tags and attributes: <a href="">, <strong>, <em>, <h1>, <h2>, <h3>
Please note:  all comments go through moderation.

*

日本語が含まれない投稿は無視されますのでご注意ください。(スパム対策)