Tag: centos

Docker + Laravel安装

我使用CentOS 7与Docker和Laravel进行了一次小小的合作。 使用教程( https://tecadmin.net/install-laravel-framework-on-centos/# )安装,我不知道为什么,但第五步内出现了问题。 terminal说这个: [root@docker laravel]# php artisan key:generate PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/www/laravel/artisan on line 31 而在工匠线31是这样的: $kernel = $app->make(Illuminate\Contracts\Console\Kernel::class); 如果有人有一个想法请帮助。 我希望安装Laravel结合Docker和Laravel与Laradock,我希望这不会像这样错误感谢莫里茨

在docker容器中运行auditd

我想在centos docker容器中configurationrsyslog客户端,我注意到下面的错误。 看起来像rsyslogd正在退出由于审计失败。 任何想法如何让rsyslog服务工作在centosdocker集装箱内? 试过这个build议,但没有运气。 May 16 09:49:35 ad5de951dcd4 auditd[312]: Started dispatcher: /sbin/audispd pid: 316 May 16 09:49:35 ad5de951dcd4 auditd[312]: Unable to set initial audit startup state to 'enable', exiting May 16 09:49:35 ad5de951dcd4 auditd[312]: The audit daemon is exiting. May 16 09:49:35 ad5de951dcd4 systemd: auditd.service: main process exited, code=exited, status=1/FAILURE May 16 09:49:35 ad5de951dcd4 […]

docker容器内的时区ID不正确

我已经从Centos7基础镜像创build了一个docker镜像,并在运行容器时,时间和时区与我的主机不同步。 为容器提供与主机相同的时区。 在运行容器时,我使用“-v”参数从主机挂载了/ etc / timezone和/ etc / localtime。 运行这个容器后,这是我得到的容器和主机: 对于docker容器运行timedatectl: [root@d7a24c723f6a /]# timedatectl Local time: Tue 2017-08-01 10:28:30 IST Universal time: Tue 2017-08-01 04:58:30 UTC RTC time: n/a Time zone: UTC (IST, +0530) NTP enabled: n/a NTP synchronized: no RTC in local TZ: no 对于运行timedatectl的主机: [root@indiadev72 ~]# timedatectl Local time: Tue 2017-08-01 10:27:29 IST […]

docker容器作为打印机服务器,打印机只安装在容器中

作为SAMBA文件共享服务器,我已经在centos映像上运行了一个容器。 是否有可能运行一个容器作为打印机服务器与打印机和CUPS只安装在容器,但不是在主机? 我想要的是在一个容器中运行桑巴和杯子,所以当创build容器时可以通过v选项将打印机安装到容器中,但是同时打印机没有安装在主机中。 所以如果可能的话,我会得到一个带有打印机驱动程序和CUPS&samba的centos容器,但是没有一个安装在主机上。 选项: 打印机驱动程序和CUPS&SAMBA只安装在docker集装箱基地centos(我想要的) 打印机驱动程序安装在主机上,而CUPS和SAMBA安装在基于centos的docker容器中(如果选项1是不可能的,我可以接受) 打印机驱动程序和CUPS安装在主机上,只有SAMBA被安装在集群上的容器基础上(真的不需要这个)

chef-server卡住ruby_block 动作在Docker容器上运行

我有一个运行docker1.2的ubuntu主机。 最重要的是我创build了一个运行centos6容器! 当我尝试安装chef-server-11.x版本时,它被卡在这里: * file[/opt/chef-server/sv/rabbitmq/down] action delete (up to date) * link[/opt/chef-server/init/rabbitmq] action create (up to date) * link[/opt/chef-server/service/rabbitmq] action create (up to date) * ruby_block[supervise_rabbitmq_sleep] action run 谷歌search后,我发现我们需要指定平台在/opt/chef-server/embedded/cookbooks/runit/recipes/default.rb ,我看到下面的文件包含,但它仍然不工作: when "centos" include_recipe "runit::upstart" 我需要为docker运行centos指定其他的东西吗?

连接到在boot2docker(centos容器| Windows 7.1主机)上运行的python服务器时出错

我的用例 : 我们需要在无头模式下运行watir-webdriver脚本,我们的开发机器运行Windows。 我们问题的要点 : 我可以站在容器内的python服务器,但我不能连接到它的主机预期的位置: http://192.168.59.103:8084. : http://192.168.59.103:8084. : http://192.168.59.103:8084. 架构 : 一个ruby脚本,它“做一些有用的事情并将输出打印到控制台”和一个导入os的基本python服务器,然后在我们的索引path中执行os.system('ruby ourrubyscript.rb')。 我们还提供了api routing和flask.cors的烧瓶,以消除潜在的交叉产地问题。 本地testing(在主机上) : 在我们的主机工作区运行“python server.py”,在端口5000上站起来一个python服务器。从浏览器到它的路由执行我们的路由,并将预期输出打印到控制台。 server.py from flask import Flask from flask import request from flask.ext.cors import CORS import os app = Flask(__name__) CORS(app, resources={r'/': {"origins": "*"}}, headers='Content-Type') app.config['CORS_HEADERS'] = 'Content-Type' @app.route('/') def index(): return "<h1>Hello Stupid</h1>" @app.route('/ruby/test', methods=['GET']) […]

Vagrant如何在CentOS上自动安装Docker?

我想知道Vagrant是如何在Dockerconfiguration器上安装Docker的。 stream浪者是使用某些软件包pipe理器中的软件包还是从源代码构build? 哪些命令被解雇完成安装过程?

在docker centos容器上安装Oracle:磁盘空间不足

我尝试在一个docker容器中安装oracle 11g。 该容器是从centos:6图像构build的。 主机是一个fedora21。 oracle安装程序(/ opt / oracle / database / runInstaller)抱怨磁盘空间不足: SEVERE: [FATAL] [INS-32021] Insufficient disk space on this volume for the selected Oracle home. CAUSE: The selected Oracle home was on a volume without enough disk space. ACTION: Choose a location for Oracle home that has enough space (minimum of 4,324MB) or free […]

脚本testing,看看是否已经加载了一个工具?

我正在学习docker,而且我正在尝试执行shelltesting以查看是否已经加载了关键工具。 我正在做一些testing,将docker部署到不同的服务器。 这是脚本,保存为dockerScript.sh #!/bin/bash ## run "$ chmod +x dockerScript.sh" to make the script executable. ## then run "./dockerScript.sh" to activate the script touch docker-compose.yml cat > docker-compose.yml <<EOL version: "2" services: (etc…) EOL if[docker-compose is not already loaded] <— what goes here? then curl -L https://github.com/docker/compose/releases/download/1.14.0-rc2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose chmod +x /usr/local/bin/docker-compose fi […]

docker centos6.6容器上的autoexpect无法工作

Docker容器纯image:bash之后的centos6.6,我安装这些:yum -y install tar zip解压缩期望glibc.i686 套件expect-5.44.1.15-5.el6_4.x86_64已经安装并且最新版本 并运行autoexpect,我总是得到这些错误: [root@179314389a2c bin]# autoexpect autoexpect started, file is script.exp no such variable (read trace on "env(SHELL)") invoked from within "spawn -noecho $env(SHELL)" invoked from within "if {[llength $argv]>0} { eval spawn -noecho $argv cmd "spawn $argv" } else { spawn -noecho $env(SHELL) cmd "spawn \$env(SHELL)" }" (file "/usr/bin/autoexpect" line […]