Docker - MySQL容器不能继续运行(Docker - MySQL container does not keep running)
我需要一些帮助在Docker容器中使用MySQL。 我认为Docker的全部意义在于隔离沙箱中的进程并让它们像正常进程一样运行 - 我没有得到这个功能。
每当我运行一个我自己的图像构建的MySQL容器时,它运行2秒钟,然后停止。 尝试使用
docker run -i -t <imageid>
给我这个:root@CenturionX:/home/centurionx/Code/Git/gdms-rcon# docker run -i -t e2d 150221 05:25:21 mysqld_safe Logging to '/var/lib/mysql/28123b6d1dad.err'. 150221 05:25:21 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 150221 05:25:21 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended root@CenturionX:/home/centurionx/Code/Git/gdms-rcon#
为什么守护进程不能保持打开状态? 我有我的
Dockerfile
,看起来像:# This docker file constructs a MySQL database instance FROM mysql:latest ADD . /gdms-rcon/mysql WORKDIR /gdms-rcon/mysql ENTRYPOINT ["/usr/bin/mysqld_safe"] EXPOSE 3306
还有一个
fig.yml
文件来帮助我自动化构建过程:mysql: build: . volumes: - .:/gdms-rcon/mysql working_dir: /gdms-rcon/mysql ports: - "3306:3306" environment: - MYSQL_DATABASE=mydb - MYSQL_ROOT_PASSWORD=mypassword
I need some help with using MySQL in a Docker container. I thought the entire point of Docker was to isolate processes in sandboxes and have them run like normal processes - I am not getting this functionality.
Whenever I run a MySQL container that I have built from my own image, it runs for 2 seconds, then stops. Trying
docker run -i -t <imageid>
gives me this:root@CenturionX:/home/centurionx/Code/Git/gdms-rcon# docker run -i -t e2d 150221 05:25:21 mysqld_safe Logging to '/var/lib/mysql/28123b6d1dad.err'. 150221 05:25:21 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql 150221 05:25:21 mysqld_safe mysqld from pid file /var/run/mysqld/mysqld.pid ended root@CenturionX:/home/centurionx/Code/Git/gdms-rcon#
Why does the daemon not stay open? I have my
Dockerfile
, which looks like:# This docker file constructs a MySQL database instance FROM mysql:latest ADD . /gdms-rcon/mysql WORKDIR /gdms-rcon/mysql ENTRYPOINT ["/usr/bin/mysqld_safe"] EXPOSE 3306
And a
fig.yml
file to help me automate the build process:mysql: build: . volumes: - .:/gdms-rcon/mysql working_dir: /gdms-rcon/mysql ports: - "3306:3306" environment: - MYSQL_DATABASE=mydb - MYSQL_ROOT_PASSWORD=mypassword
原文:https://stackoverflow.com/questions/28642483
满意答案
如果要控制数组何时刷新,请将其包装在outputpanel中,并将其id放在rerender属性中,以导致数据需要更新。 在重新更新每个dom时,我不得不使用此方法重新附加一些自定义jQuery输入侦听器。
<apex:commandButton action="{!something}" rerender="scriptPanel"/> <apex:outputPanel id="scriptPanel> <script> d = new Array(); <apex:repeat value="{!objects}" var="object"> d.push({ element1: "{!objects.id}" }); </apex:repeat> </script> </apex:outputPanel>
If you want to control when your array gets refreshed wrap it in an outputpanel and put its id in the rerender attribute of whatever causes the data to need an update. I had to use this previously to reattach some custom jQuery input listeners when every the dom was re-updated.
<apex:commandButton action="{!something}" rerender="scriptPanel"/> <apex:outputPanel id="scriptPanel> <script> d = new Array(); <apex:repeat value="{!objects}" var="object"> d.push({ element1: "{!objects.id}" }); </apex:repeat> </script> </apex:outputPanel>
相关问答
更多通过预定的顶点调用visualforce Page(Call visualforce Page through scheduled apex)
Visualforce Apex触发器更新错误记录(Visualforce Apex Trigger updating wrong records)
从visualforce页面获取javascript中的表单字段值(Get values of form field in javascript from a visualforce page)
Visualforce编码Javascript(Visualforce encode Javascript)
试图在Apex重复中捕获Apex:InputText(Trying to capture Apex:InputText within Apex repeat)
如何在VisualForce中创建并行记录比较(How to create side-by-side record comparison in VisualForce)
Visualforce中的Apex SOQL子查询(Apex SOQL subquery in Visualforce)
在内部时,无法获取的值(Cannot get values of when inside )
VisualForce,Apex:重复,用于Javascript数组更新(VisualForce, Apex:Repeat, for Javascript array Update)
在visualforce中从javascript调用控制器方法(Call a controller method from javascript in visualforce)
相关文章
更多Docker 容器创建并运行MySQL
Another MySQL daemon already running with the same unix socket.
揭开Docker神秘的面纱-传智播客Docker视频教程
Running Solr with Maven
mysql问题
HDFS patch前后Ganglia看到running processes变化的分析
关于netbeans和mysql的问题
my php & mysql FAQ
最新问答
更多获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
如何通过引用返回对象?(How is returning an object by reference possible?)
矩阵如何存储在内存中?(How are matrices stored in memory?)
每个请求的Java新会话?(Java New Session For Each Request?)
css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
xcode语法颜色编码解释?(xcode syntax color coding explained?)
在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
Copyright ©2023 peixunduo.com All Rights Reserved.粤ICP备14003112号
本站部分内容来源于互联网,仅供学习和参考使用,请莫用于商业用途。如有侵犯你的版权,请联系我们(neng862121861#163.com),本站将尽快处理。谢谢合作!