Tag: 文件

在构builddocker映像时找不到有效的基础版repo:base / 7 / x86_64

我想build立一个基于centos 7的docker镜像,dockerfile如下 FROM centos MAINTAINER pengji jipeng92@gmail.com WORKDIR /root COPY MySQL-5.6.26 /mysql RUN yum update RUN yum -y install java-1.8.0-openjdk wget httpd php php-mysqlnd /mysql/* RUN mysql_install_db –user=mysql ENV MYSQL_ROOT_PASSWORD=root ENV MYCAT_USER mycat ENV MYCAT_PASS mycat RUN wget http://mirror.bit.edu.cn/apache/tomcat/tomcat-7/v7.0.64/bin/apache-tomcat-7.0.64.tar.gz RUN tar xvf apache-tomcat-7.0.64.tar.gz -C /usr/local/ && mv /usr/local/apache-tomcat-7.0.64/ /usr/local/tomcat RUN wget http://code.taobao.org/svn/openclouddb/downloads/old/MyCat-Sever-1.2/Mycat-server-1.2-GA-linux.tar.gz RUN mkdir /usr/local/mycat […]

Docker for Jobs

我想了解这是否是Docker的有效用例。 假设我正在创build一个python应用程序,并且用户提交了一个特定types的作业。 然后,我想通过编程方式使用docker run来启动一个devise用于处理作业的docker映像。 docker图像将需要能够接收作业,然后退出给我发送一条消息,说明作业是成功的。 这有道理吗? 这怎么可以用python来完成呢? 我如何观察docker集装箱及其状态? 或者,对于Docker镜像来说,只需要在一个循环中运行,从共享卷中寻找作业,会更有意义吗?

在泊坞窗外保存的文件作为docker卷被损坏

在我的主人,我有这个目录: /Users/gezimhome/projects/ziprecipes.net/zip-recipes/src 我将其装载到我的docker容器中,如下所示: /usr/share/nginx/html/wordpress/wp-content/plugins/zip-recipes 如果我修改以下文件(例如添加一个新行)docker: /Users/gezimhome/projects/ziprecipes.net/zip-recipes/src/plugins/VisitorRating/scripts/main.js ,我得到一个语法错误浏览器: 苹果浏览器: 铬: 如果我进入docker集装箱,打开文件( /usr/share/nginx/html/wordpress/wp-content/plugins/zip-recipes/plugins/VisitorRating/scripts/main.js )并再次保存没有改变,错误消失了。 我知道这将是一个弯曲的头脑。 我已经尝试了多个编辑器/ IDE在我的主机保存文件。 没什么区别。 更新 :哇,我保存在docker里面的文件,当我从docker里面编辑它,当我从外面编辑它,并做了差异没有发现差异: cp /usr/share/nginx/html/wordpress/wp-content/plugins/zip-recipes/plugins/VisitorRating/scripts/main.js /host.js # editted the file in same way inside docker cp /usr/share/nginx/html/wordpress/wp-content/plugins/zip-recipes/plugins/VisitorRating/scripts/main.js /docker.js root@219a4126d14a:/# diff /host.js /docker.js root@219a4126d14a:/#

在Docker中引导Percona Xtradb集群出现错误:无法打开和locking特权表:表'mysql.user'不存在

我的目标是获得在Docker容器中运行的Percona XtraDB安装。 为此我写了以下configuration。 Dockerfile: FROM ubuntu:wily ENV DEBIAN_FRONTEND noninteractive # # ENVIRONMENT INSTALL # RUN apt-get update && apt-get upgrade -y && apt-get dist-upgrade -y && apt-get install -y wget curl netcat python-dev python-setuptools python-software-properties vim RUN easy_install j2cli COPY my.cnf.j2 /templates/ COPY docker-entrypoint.sh / RUN chmod +x docker-entrypoint.sh / # # PERCONA XTRADB CLUSTER […]

Docker容器运行不正常

我在Symfony开发的基础Docker容器中工作。 我正在使用Docker Toolset for Windows。 这是我的Dockerfile: FROM centos:6.7 MAINTAINER Reynier Perez <reynierpm@gmail.com> # basic env fix ENV TERM xterm # Install REMI and EPEL repos RUN yum update -y RUN yum install -y mc wget yum-utils htop nano curl git RUN wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm \ && wget http://rpms.remirepo.net/enterprise/remi-release-6.rpm \ && rpm -Uvh remi-release-6.rpm epel-release-latest-6.noarch.rpm RUN yum-config-manager […]

高山Linux Docker SSHD图像使用VOL-save?

我正在看的一幅阿尔卑斯山的图像有以下几行: RUN \ apk –no-cache add openssh && \ VOL-save /etc/ssh && \ echo "root:root" | chpasswd VOL-save做什么? TIA,Ole

Docker HTML发布

我已经创build了一个简单的HTML文件(只是普通的编码没有特别的),现在我的问题或帮助是,我想发布这个/通过docker图像和容器只运行这个HTML文件。 请帮助我通过它…..

当用户尝试执行javac时,构buildDocker镜像失败

我正在尝试创build一个Dockerfile,但是如果我添加一个用户,它在构build过程中会一直失败。 如果我删除用户,图像的构build过程就成功了,但是我需要用户,因为这是我正在使用的代码环境引擎的一个要求。 Dockerfile: FROM java MAINTAINER DavidRenz RUN groupadd app -g 9000 && useradd -g 9000 -u 9000 -r -s /bin/false app VOLUME /code WORKDIR /code COPY . /usr/src/app USER app RUN javac /usr/src/app/bin/Pmd.java CMD ["java", "/usr/src/app/bin/Pmd"] 日志: Step 7 : USER app —> Running in 896795a6bb63 —> 09c5179159a8 Removing intermediate container 896795a6bb63 Step 8 […]

在dockerfile中执行curl命令时出错

我有一个4行dockerfile。 前三个命令按预期工作。 但是我在第四行发现错误。 FROM elasticsearch RUN wget https://dumps.wikimedia.org/other/cirrussearch/20160215/emlwiki-20160215-cirrussearch-content.json.gz RUN gunzip emlwiki-20160215-cirrussearch-content.json.gz RUN curl -s -XPOST localhost:9200/wikipedia_content/somelan/_bulk –data-binary @emlwiki-20160215-cirrussearch-content.json 如何在dockerfile中执行curl命令?

docker与芒戈用户

我正在尝试为安全原因创build一个mongodb用户。 现在我有以下Dockerfile: FROM mongo:3.3 RUN mongo admin –eval "db.getSiblingDB('db').createUser({user: 'test', pwd: 'test'})" 当我运行docker时,出现以下错误: MongoDB shell version: 3.3.5 connecting to: admin 2016-05-17T13:31:07.821+0000 W NETWORK [thread1] Failed to connect to 127.0.0.1:27017, reason: Connection refused 2016-05-17T13:31:07.821+0000 E QUERY [thread1] Error: couldn't connect to server 127.0.0.1:27017, connection attempt failed : connect@src/mongo/shell/mongo.js:229:14 @(connect):1:6 exception: connect failed ERROR: Service 'mongodb' failed […]