Tag:

可以挂载音乐docker运行

无法使用以下脚本装入卷 docker run –server -p 8080:80 -v /d/XAMPP/htdocs:/var/www/html -d php:7.0-apache 当我尝试 docker run –server -p 8080:80 -v /d:/var/www/html -d php:7.0-apache 有了这个命令,只有XAMPP文件夹被挂载在docker中,并且我没有看到任何文件夹,当我尝试访问浏览器上的根文件夹时,我有403个文件夹列表。

aws中的docker swarm在重启后无法访问

我有一个Docker swarm,由一个主节点和两个工作节点组成,在AWS中运行,每天晚上我停止swarm集群运行的所有实例,并在第二天早上再次启动它们。 问题是,我每天都注意到几个服务无法启动,并且群体必须重新创build它们(这只是出于某种原因,总是在worker 1上发生),我不能ssh到worker1或worker2上运行的任何服务我没有安排master任何服务)。 当服务失败时,我得到这个错误: task: non-zero exit (0): No such container: containerName PS ec2实例只有一个根ebs我正在运行它的群体。 另外,当我停止worker1时,swarm会调度worker2中的所有服务,但是我仍然无法从群集外对其进行ssh调用。 在我再次启动worker1并在worker1和worker2之间手动重新分配服务之后,一切正常( I can ssh to the containers but only the new ones created through the update command old ones still wont be accessible) 。 我用来重新分配的命令是: docker service update –force containerName 结果 unable to pin image registry:myImage to digest: Get […]

在其他地址窗口上公开Docker守护进程

我目前有安装Windows的Docker。 在设置 – 通用,你有以下选项:“公开守护进程在tcp:// localhost:2375没有TSL” 有没有可能改变主机:端口? 防爆。 localhost:3333或191.168.12.1:2376 根据文件有“主机”选项。 "hosts": ["tcp://192.168.59.3:2376"] https://docs.docker.com/engine/admin/#troubleshoot-the-daemon https://docs.docker.com/engine/reference/commandline/dockerd/#linux-configuration-file 我把这个添加到守护进程设置,但是然后docker在启动时失败。 亲切的问候,J

Docker – 具有自定义conf的nginx

当运行docker-compose.yml docker-compose up和下面docker-compose.yml文件时, nginx在启动后立即退出。 当我删除以下行: – ./nginx/config:/etc/nginx/conf.d nginx不会立即退出。 docker-compose.yml version: '3' services: nginx: image: nginx ports: – '8080:80' volumes: – ./nginx/log:/var/log/nginx – ./nginx/config:/etc/nginx/conf.d – ../wordpress:/var/www/wordpress php: image: php:fpm ports: – 9000:9000 mysql: image: mysql ports: – "3306:3306" environment: MYSQL_ROOT_PASSWORD: secret volumes: – ./mysql/data:/var/lib/mysql 我怎样才能让nginx运行一个自定义的/etc/nginx/conf.d/default.conf ?

从Mac删除dlite

我正在尝试使用Docker for Mac而不是Docker工具箱,并且想要删除dlite。 但是当我运行$ dlite uninstall Removing virtual machine: ERROR! open /Users/user/.dlite/config.yaml: no such file or directory $ dlite uninstall Removing virtual machine: ERROR! open /Users/user/.dlite/config.yaml: no such file or directory我使用dlite版本2.0.0-beta9。

如何使用docker-compose将PHP容器与nginx容器连接起来?

我试图在Docker环境中创build一个简单的LAMP堆栈。 它通过运行第三方容器phpdockerio/php71-fpm:latest ,但是我想要一个安装了XDebug的自定义PHP容器。 我的问题是,如果我执行docker-compose up ,启动后的PHP容器退出之前,我的webserver容器可以使用它。 我怎样才能成功告诉PHP容器等待我的nginx容器的连接? 命令行输出 PS C:\playground> docker-compose.exe up Starting playground_php_1 Starting playground_web_1 Attaching to playground_php_1, playground_web_1 playground_php_1 exited with code 0 playground_web_1 exited with code 1 Dockerfile FROM php:latest RUN pecl install xdebug \ && docker-php-ext-enable xdebug ENTRYPOINT ["docker-php-entrypoint"] CMD ["php", "-a"] 泊坞窗,compose.yml version: '2' services: php: build: context: ./etc/php/ dockerfile: […]

如何使用docker-java客户端库获取docker容器日志

我尝试了下面的代码,但是响应包含一个对象而不是日志。 DockerClientConfig config = DefaultDockerClientConfig.createDefaultConfigBuilder() .withDockerHost("tcp://IP:PORT").withDockerTlsVerify(true) .withDockerCertPath("………..CERTIFICATE PATH……….").build(); DockerClient dockerClient = DockerClientBuilder.getInstance(config).build(); dockerClient.logContainerCmd("Container ID") .withStdOut(true).withFollowStream(true) .exec();

将docker容器的权限分享给来自volumes_from的php-fpm映像

我正在dockerizing一个应用程序。 我做了这个组合文件,为这个应用程序创build一个数据容器,master,并使用nginx和php-fpm来服务它,但是所有的时候我都有权限问题: salahaddin@TulipanROG  ~/Proyectos/UzmanTech/opus  nginx-server ✚ ●  docker-compose logs -f | grep opus.php  130 ↵  2678  05:37:53 Attaching to opus.db-seed, opus.web, opus.php, opus.key, opus.migration, opus.master, opus.redis, opus.db opus.php | [23-Jun-2017 02:37:21] NOTICE: fpm is running, pid 1 opus.php | [23-Jun-2017 02:37:21] NOTICE: ready to handle connections opus.php | [23-Jun-2017 […]

用Docker错误500设置本地WordPress开发环境

我需要帮助build立我的docker,我知道有很多已经configuration的环境,但我需要一个适合我的需求。 贝娄你可以find我的设置。 泊坞窗,compose.yml version: '3' services: nginx: image: nginx:latest ports: – "80:80" volumes: – ./wordpress:/var/www/html – ./config/nginx:/etc/nginx/conf.d – ./logs/nginx:/var/log/nginx depends_on: – phpfpm restart: always mariadb: image: mariadb:latest ports: – "3306:3306" volumes: – ./data/db:/var/lib/mysql environment: MYSQL_ROOT_PASSWORD: password MYSQL_DATABASE: wordpress MYSQL_USER: wordpress MYSQL_PASSWORD: password restart: always phpfpm: image: php:fpm ports: – "9000:9000" volumes: – ./wordpress:/var/www/html depends_on: – […]

为Docker容器引导大量的媒体

我正在Docker中设置一个项目,并为已configuration的UAT环境的一键(ish)部署定义了一个堆栈文件。 为了做到这一点,我需要为环境带来7GB的资产。 我试图解决这个问题,只用数据容器转储主机系统上的卷中的数据,这将被拉到一个应用程序容器。 我使用这种方法遇到的问题是,Docker Cloud似乎并没有部署/启动这个仅限数据的容器,可能是因为它的大小。 它只是超时。 Preparing to redeploy… Inspecting an/image:media image in the registry Image up to date in our database Choosing nodes ['abc123.node.dockerapp.io'] because of the deployment strategy Choosing nodes ['def456.node.dockerapp.io', 'abc123.node.dockerapp.io'] because of the deployment strategy Redeploying… an-image-media-2: Pre-pulling image an/image:media in def456.node.dockerapp.io an-image-media-2: Downloading layer 0101010 an-image-media-2: Stopping gracefully (Timeout 10s)… […]