我知道我可以将postgres图像的默认文件夹更改为指向卷--在这种情况下,卷显然将保持不变。但我没有这么做,因为我想了解这个图像的默认行为。
所以我就跑了:
# in one terminal
docker pull postgres
# as a foreground process:
docker run -P --name dev_db postgres
# in another terminal
docker run --rm -it --link dev_db:dev_db /bin/bash
# in this container, I created some databas
我的docker构建可以在我的设备上运行。当我上传到digital-ocean服务器并执行"docker-compose up -d“命令时,除了”前端“,所有的容器都启动了。问题出在“卷”上,当我删除它时,一切都正常。如何解决这个问题?我需要这份财产保留下来。 frontend_1 | > test-docker@0.1.0 dev /app/client
frontend_1 | > next dev
frontend_1 |
frontend_1 | sh: 1: next: not found
frontend_1 | npm ERR! code ELIFECYC
我在windows10笔记本电脑上运行docker,我已经使用Dockerfile设置了我的第一个运行Elasticsearch的容器,并且运行正常。每次我停止容器并重新启动它时,数据都会消失。
在我的windows机器上,我在C:/Docker/esdata位置创建了一个文件夹,在我的elasticsearch.yml中,我添加了path.data: /usr/share/elasticsearch/data is were data is。在Dockerfile中,我添加了:
VOLUME /c/Docker/esdata:/usr/share/elasticsearch/data
但是这
我正在尝试在我的主机系统中使用MySQL docker容器,以使安装和配置过程变得更容易、更快。
因此,我从上提取了一张图片
然后根据这个镜像启动容器..
容器启动正常,但是我无法从我的主机系统连接到这个数据库(如果我尝试从容器连接,一切都是正常的)。它失败,并显示一条消息:
ERROR 1130 (HY000): Host '<here goes my IP>' is not allowed to connect to this MySQL server
因此,据我所知,我的root用户没有足够的权限。
我已经进入我的容器:
docker exec -it mys