[英]share a directory between a docker pgadmin container and windows10
From within my docker pgadmin container, I want to access a postgresql backup file located in my windows10 OS.从我的 docker pgadmin 容器中,我想访问位于我的 windows10 操作系统中的 postgresql 备份文件。 So I'm trying to set up a shared directory.
所以我正在尝试建立一个共享目录。 Running this command works fine.
运行此命令工作正常。 Directory is linked to the container.
目录链接到容器。
docker run --name=windows10 -d -v C:\Users\johndoe:/windows10 -p 5554:80 dpage/pgadmin4 -e PGADMIN_DEFAULT_EMAIL=john@doe.com -e PGADMIN_DEFAULT_PASSWORD=whatever
However, the directory won't mount because it's giving this error log on startup:但是,该目录不会挂载,因为它在启动时给出了这个错误日志:
You need to specify PGADMIN_DEFAULT_EMAIL and PGADMIN_DEFAULT_PASSWORD environment variables
What is this sorcery??这是什么法术??
Move the environment variables to before the image name将环境变量移到图像名称之前
docker run --name=windows10 -d -v C:\Users\johndoe:/windows10 -p 5554:80 -e PGADMIN_DEFAULT_EMAIL=john@doe.com -e PGADMIN_DEFAULT_PASSWORD=whatever dpage/pgadmin4
-e
is an option and must be specified between run
and IMAGE
(see https://docs.docker.com/engine/reference/commandline/run/ ) -e
是一个选项,必须在run
和IMAGE
之间指定(参见https://docs.docker.com/engine/reference/commandline/run/ )
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.