Docker-compose environment variables

前端 未结 7 964
滥情空心
滥情空心 2021-02-01 13:44

I am trying to setup a postgres container and want to setup the postgres login with:

POSTGRES_USER: docker
POSTGRES_PASSWORD: docker

So I have

7条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-01 14:11

    Thanks to Bryan with the docker-compose exec containername env I have discovered that the need is also to delete volumes. Since for the docker-compose volume rm volumename you need to know the exact name it is easier just to delete all with:

    docker-compose down --volumes
    

提交回复
热议问题