Tag: 服务器

如何将Docker文件部署到真机上

背景:我正在使用Docker来构build我的开发环境(Web应用程序,nginx,gunicorn,postgress需要提及的几个)。 我希望我的开发环境与生产环境相匹配。 我现在使用Debian 7作为基础发行版,但问题不是与Debian相关的。 我不希望docker上的实际生产(安全更新,监控,日志logging提及less数,但多数民众赞成在不同的问题为什么不),但我想使用真正的Debian 7作为生产环境。 问题:有没有办法以本地命令的forms运行构builddocker-image的命令,例如: docker deploy_to_host <Dockerfile> ,它将以root用户命令的forms运行RUN指令。这与我将主机根用户命令open和手动复制粘贴命令。 谢谢!

Docker未绑定的DNS服务器:如何启动服务

我的主机系统是Arch Linux,Docker映像是“base / arch”(archlinux),并有我自己的修改。 Unbound被安装在一个提交的镜像上,但是我不知道如何启动运行该服务的容器,因为SystemD并不打算在Docker中运行。 我如何真正启动容器作为一个服务作为Unbound运行? 我已经通过一些基本的教程,但其中大部分包括启动预build容器: Dockers基础课程。 Arch Wiki。 数字海洋概述。 谢谢!

Docker日志文件:如何知道笔记的时间?

我有从docker容器服务器的日志文件。 我怎么能知道什么时候确切的行被写入? 日志视图如下所示: … [90mGET /api/clients [32m200 [90m31ms[0m [90mGET /api/clients/564adbadf9e6a9cf7281053f/getAllClientsByAdmin [32m200 [90m19ms[0m [90mPOST /api/clients/50000b00000389/heartBeat [32m200 [90m38ms – 210b[0m [90mGET /api/clients [36m304 [90m17ms[0m [90mGET /api/clients [36m304 [90m19ms[0m [90mGET /api/clients/56a752ad53259fa20629da24/getAllClientsByAdmin [36m304 [90m26ms[0m [90mGET /api/clientFiles/download/7aa4f7d3e4a5ecaebd86696f642c9204 [33m404 [90m4ms – 9b[0m [90mGET /api/clients [36m304 [90m14ms[0m [90mGET /api/clients/4edd40c86762e0fb12000003/getAllClientsByAdmin [36m304 [90m19ms[0m [90mGET /api/clients/5644a32ce9e9a5125be6adc1/getAllClientsByAdmin [32m200 [90m88ms[0m [90mGET /api/clients [32m200 [90m80ms[0m [90mGET /api/clients/5644a32ce9e9a5125be6adc1/getAllClientsByAdmin [32m200 […]

为整个服务器使用docker镜像

我为我的一些项目购买了VPS服务器。 我想知道在这个服务器上运行一个docker映像是否有意义,并且在docker镜像上执行所有的服务器configuration,项目configuration,虚拟主机等。 我的目标是避免重做所有的configuration工作,如果我改变服务器。 Docker是否适合这个? 我应该改为每个项目build立一个docker图像(但是,我将不得不有多个Apache实例,我猜)? 如果我换服务器,真的会节省时间吗?

牧场容器利用率统计坚持连接

我一直在使用Rancher几个星期,但是我从来没有设法使用Utilization Stats在Containers上工作。 它只是坐在那里说连接… 使用统计信息适用于主机,但不适用于容器。 Rancher Agent与主机位于同一台机器上,因此我使用-e CATTLE_AGENT_IP = 192.168.0.202(主机和代理IP)启动了它,但仍然没有任何结果。 我也尝试在第二台服务器上使用Debian虚拟机,但是我遇到了同样的麻烦。 在我的个人计算机上运行Windows docker quickstartterminal,并将其作为代理使用,然而奇怪的是, 无论我select托pipenetworking还是桥接,都会发生同样的情况。 我已经找了几个星期,但没有find可靠的答案,任何帮助将不胜感激,谢谢。 主机信息: Containers: 13 Running: 9 Paused: 0 Stopped: 4 Images: 419 Server Version: 1.11.1 Storage Driver: aufs Root Dir: /var/lib/docker/aufs Backing Filesystem: extfs Dirs: 366 Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge null […]

Docker WordPress CPU在select特色图片时跳转

我有1个内存和1个CPU的DO VPS。 当我select特色图片时,我开始看到一些问题。 我失去了数据库连接,所以我查看了docker和DO CPU统计数据,select了1meg大小的图片之后不久,我的wp容器的CPU猛涨了,导致内存耗尽或者什么也没做? 然后有以下,当试图运行docker ps -a : runtime/cgo: pthread_create failed: Resource temporarily unavailable SIGABRT: abort PC=0x7f55471d3428 m=0 goroutine 0 [idle]: goroutine 1 [running]: runtime.systemstack_switch() /usr/local/go/src/runtime/asm_amd64.s:245 fp=0xc820020770 sp=0xc820020768 runtime.main() /usr/local/go/src/runtime/proc.go:126 +0x62 fp=0xc8200207c0 sp=0xc820020770 runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1998 +0x1 fp=0xc8200207c8 sp=0xc8200207c0 goroutine 17 [syscall, locked to thread]: runtime.goexit() /usr/local/go/src/runtime/asm_amd64.s:1998 +0x1 rax 0x0 rbx 0x7f5547562700 rcx 0x7f55471d3428 rdx […]

OrientDB Studio不在Windows Server 2016的Docker容器中启动

我正在用下面的Dockerfile创build一个OrientDB容器 FROM microsoft/windowsservercore LABEL Description="OrientDB" Vendor="OrientDB" Version="2.2.16" #install java #https://alexandrnikitin.github.io/blog/running-java-inside-windows-container-on-windows-server/ RUN powershell (new-object System.Net.WebClient).Downloadfile('http://javadl.oracle.com/webapps/download/AutoDL?BundleId=210185', 'C:\jre-8u91-windows-x64.exe') RUN powershell start-process -filepath C:\jre-8u91-windows-x64.exe -passthru -wait -argumentlist "/s,INSTALLDIR=c:\Java\jre1.8.0_91,/L,install64.log" RUN del C:\jre-8u91-windows-x64.exe RUN powershell -Command $path = $env:path + ';C:\Java\jre1.8.0_91\bin'; Set-ItemProperty -Path 'HKLM:\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\' -Name Path -Value $path RUN powershell -Command \ $progressPreference = 'silentlyContinue' ; \ $ErrorActionPreference = 'Stop'; […]

无法将使用docker run的命令行parameter passing给Shell脚本文件

使用的命令: sudo docker run -it -p 80:9000 c822030cc576 sh /app/test/play/docker-entrypoint.sh /app/test/play/servers/server01/play/conf/override.conf /app/log/nflott/play true dev 我的参数: $2:/app/test/play/servers/server01/play/conf/override.conf $3:/app/log/nflott/play $4:true $5:dev Which needs to be passed to the docker-entrypoint.sh Script 我的entrypoint.sh脚本代码: echo "CONFIG:$2 echo "LOG_HOME:$3" echo "SKIP_LOGFILE:$4" echo "LOG_ENV:$5 /app/test/play/servers/server01/play/bin/apiserver \ -Dconfig.file=/app/test/play/servers/server01/play/conf/override.conf \ -Dpidfile.path=/app/test/play/servers/server01/RUNNING_PID \ -DLOG_HOME=$3 \ -DSKIP_LOGFILE=$4 \ -DLOG_ENV=$5 \ Error: CONFIG:/app/test/play/servers/server01/play/conf/override.conf LOG_HOME:/app/log/nflott/play SKIP_LOGFILE:true LOG_ENV:dev Bad […]

docker集装箱/图像之间的友好URL

我使用docker创build了一些项目,但是它们将处于不同的图像/容器中 有可能访问不同的docker容器具有相同的url,就像一个“友好的url”? 例: 主容器在teste.com 如果我访问teste.com/project2,teste.com/project3,我希望它在同一台服务器机器上转到不同的运行容器。 那可能吗?

在尝试通过sbt构build项目时,Docker中超出了GC开销限制

我正在尝试在Docker容器中构buildsbt项目并收到此类错误: java.lang.OutOfMemoryError:超出GC开销限制 系统规格: 操作系统osx + boot2docker(8个虚拟机的RAM) docker集装箱内的Ubuntu 15.10 Oracle java 1.7或Oracle java 1.8或OpenJdk 1.8 斯卡拉版本2.11.6 sbt版本0.13.8 它只有在运行docker build w / Dockerfile时才会失败 。 如果我通过logging到容器手动执行它,它会生成项目W / Oexception。 OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=1G; support was removed in 8.0 sbt appears to be exiting abnormally. The log file for this session is at /tmp/sbt4972348477806548245.log java.lang.OutOfMemoryError: GC […]