Articles of Docker

docker服务器容器中的WP被黑客攻击 – 服务器发送networking钓鱼邮件 – 禁用其他操作系统的容器与服务器卷装入?

在vServer上的Docker容器中没有更新的Wordpress可能已经被黑客攻击,因为提供者通知我有关发送钓鱼邮件的服务器并closures了我的机器。 现在,他们让我运行一个救援的Linux从我可以挂载以前的服务器SSD。 任何人都可以告诉我如何防止特定的容器运行时,原来的操作系统再次启动? 因为显然我不能调用docker守护进程来设置任何参数。

Docker私有registry,docker push是被禁止的

我设置了一个私人registry,运行良好。 Docker 1.10。 我select更换主机,并重新创build证书。 所有在我的服务器上运行良好,但在我的客户服务器上,我无法将图像推送到registry: unable to ping registry endpoint https://my.customer.private.hostname:5000/v0/ v2 ping attempt failed with error: Get https://my.customer.private.hostname:5000/v2/: Forbidden v1 ping attempt failed with error: Get https://my.customer.private.hostname:5000/v1/_ping: Forbidden 我找不到任何人在Google上讨论“禁止”的答案。 我在哪里可以search了解? 我已经删除了容器,图像,卸载docker,重新安装docker,但仍然是相同的错误。 唯一不删除的是用于存储docker数据的thinpool(devicemapper)。

是否有可能从PHP-FPM提供静态HTML?

我已经dockerised一个wordpress应用程序,现在我是一个纯粹主义者,不希望在docker容器中包含nginx ,并不想在nginx容器和php-fpm容器之间共享任何状态。 我想运行php-fpm作为一个独立的web服务器(如ruby中的独angular兽或python中的gunicorn),为WordPress的网站提供所有内容(html,css和图像)。 并在前面运行一个nginx反向代理(caching静态内容)。 这样我可以保持关注的分离,我没有nginx转发stream量和nginx服务器。 php-fpm的默认configuration只允许处理php文件。 php-fpm可以改变吗? 怎么样? 这是个好主意吗?

NGINX服务器说没有find文件

我试图通过使用stream明和docker来构build服务来学习微服务架构。 我有这样的文件夹结构 ./ ./base_service ./base_service/base.docker ./user_service ./user_service/user.docker ./auth_service ./auth_service/auth.docker ./gateway.docker ./vhost.conf ./docker-compose.yml 每个服务目录是一个stream明应用程序这是什么是我的docker-compose.yml文件看起来像 version: '2' services: gateway: build: context: ./ dockerfile: web.docker volumes: – ./:/var/www ports: – "8080:80" links: – base_service – auth_service – user_service base_service: build: context: ./base_service dockerfile: base.docker volumes: – ./:/var/www links: – broker auth_service: build: context: ./auth_service dockerfile: auth.docker volumes: – […]

GAE灵活环境自动缩放会为观察负载增加太多的实例

我正在GAE灵活环境testing版中运行一个Docker容器,并configuration如下的自动缩放比例: automatic_scaling: min_num_instances: 2 max_num_instances: 10 cool_down_period_sec: 60 cpu_utilization: target_utilization: 0.75 相应Compute Engine VM实例的控制台中的CPU利用率图如下所示: 然而在过去的30多分钟里,GAE已经运行了最多10次。 看看我的应用程序的日志,它似乎并不忙碌。 然而这种情况经常发生。 为什么GAE如此激进? 有比CPU利用率图更好的地方来find它用来推动缩放决策的数据吗?

Docker在Google容器引擎上撰写

我正试图设置我的项目与docker-compose up -d在谷歌容器引擎上。 这导致了一个错误消息 错误:Docker引擎版本低于Compose所需的最小值。 您当前的项目需要1.10.0或更高版本的Docker引擎。 我使用sudo apt-get upgrade docker-engine ,导致docker version见证了客户端API版本和服务器API版本之间的冲突: 来自守护进程的错误响应:客户端比服务器更新(客户端API版本:1.24,服务器API版本:1.21) 这我设法处理由DOCKER_API_VERSION=1.21 docker info 。 结果是 Containers: 0 Running: 0 Paused: 0 Stopped: 0 Images: 0 Server Version: 1.9.1 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 0 Dirperm1 Supported: true Logging Driver: json-file Plugins: Volume: Network: Swarm: NodeID: Is Manager: […]

如何使用Docker中的自定义configuration运行Nginx?

Nginxconfiguration有一个daemon off; 指令在/root/nginx.conf设置。 我试图在docker下使用这个命令来运行它: sudo docker run –name nginx-redirect -p 3128:3128 -v /root/nginx.conf:/etc/nginx/nginx.conf:ro -d nginx 但没有任何反应(除了容器ID的Docker输出,我认为这应该意味着一切正常),并且netstat -tulpn显示没有netstat -tulpn docker/nginx容器和没有3128端口,我错了? /root/nginx.conf : user www-data; worker_processes auto; pid /run/nginx.pid; daemon off; events { worker_connections 768; } http { server { listen 3128; location / { proxy_pass http://example.com; } } }

AWS ECS:简单的Apache Web服务器容器失败

我正在开始使用AWS ECS,作为一个概念certificate,我试图运行一个简单的Apache Web服务器。 问题是任务失败,closures消息: Essential container in task exited 我的任务中的容器从我的dockerfile中取出了一个Docker Hub镜像: FROM ubuntu:16.04 RUN apt update RUN apt install -y apache2 RUN echo "Welcome to my web site" > /var/www/html/index.html EXPOSE 80 我知道拉取成功了,图像可以做它应该做的事情,而且我的networking都很好,因为当我从底层EC2实例的命令行运行这个时: docker run -d -p 80:80 reponame/webserver /usr/sbin/apache2ctl -D FOREGROUND …它给了我一个工作的网页。 我给了容器一个512 MB的硬限制和从80到80的端口映射。它被标记为“基本”,我尝试使用各种值入口点,包括: /usr/sbin/apache2ctl -D FOREGROUND 有任何想法吗? 谢谢,

docker – panic:standard_init_linux.go:175:exec用户进程导致“权限被拒绝”

我正在尝试使用docker容器overlay 。 我正在启动docker守护进程: docker daemon -s overlay docker run –rm hello-world命令失败: panic: standard_init_linux.go:175: exec user process caused "permission denied" [recovered] panic: standard_init_linux.go:175: exec user process caused "permission denied" goroutine 1 [running, locked to thread]: panic(0x7e9de0, 0xc82011f110) /usr/local/go/src/runtime/panic.go:481 +0x3e6 github.com/urfave/cli.HandleAction.func1(0xc8200f32e8) /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/urfave/cli/app.go:478 +0x38e panic(0x7e9de0, 0xc82011f110) /usr/local/go/src/runtime/panic.go:443 +0x4e9 github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization.func1(0xc8200f2bf8, 0xc82001a0c8, 0xc8200f2d08) /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:259 +0x136 github.com/opencontainers/runc/libcontainer.(*LinuxFactory).StartInitialization(0xc820059630, 0x7fb8ccc34728, 0xc82011f110) /go/src/github.com/opencontainers/runc/Godeps/_workspace/src/github.com/opencontainers/runc/libcontainer/factory_linux.go:277 +0x5b1 […]

在裸机Windows 2012r2操作系统安装上使用Docker容器是否是最佳做法?

我读过容器和虚拟机上的各种东西。 这不是我问的(我不认为)。 如果我正在使用容器,我可以在虚拟机上使用它们吗? 我的服务器是裸机上的2012r2,而不是hyper-v服务器,裸机上没有虚拟化,安装了Windows Standard 2012r2。 如果我想使用Docker,是否在Hyper-V中创build一个虚拟机,并在该虚拟机中使用Docker? 我在裸机操作系统上使用Docker吗? 这是一个类似的问题, 如果容器没有Guest OS , 为什么我们使用Docker的操作系统基础镜像?