Tag: dockerfile

Dockerfile添加失败:否指定源文件

我有一个在eclipse中创build的python项目。 我正在第一次创build一个Dockerfile。Docker构build总是无法显示这个 ADD失败:没有指定源文件 我复制项目目录,并添加Python模块使用ADD命令pydev包。下面是python项目结构。 如何添加Dockerfile中的所有模块? -Myproject_rootdirectory — Client – __init__.py – Main.py –Subscriber1 – domain1 – __init__.py – d2.py – domain2 – __init__.py – d2.py – __init__.py –Subscriber2 – domain3 – __init__.py – d3.py – domain4 – __init__.py – d4.py – __init__.py

gpgp密钥请求在dockerfile中失败,但不是bash

我有一个问题,当我build立我的docker集装箱时,尝试接收gpg密钥失败。 我正在提供的命令在命令行执行时正常工作。 我在防火墙后面; 我有下面这个详细的代理设置。 主持人:CentOS 7.4; Docker版本17.09.0-ce,编译afdb6d4 对于正在使用的帐户,没有为代理设置环境variables。 Docker服务具有根据Docker设置的代理的环境variables: 在/etc/systemd/system/docker.service.d/http-proxy.conf : [Service] Environment="HTTP_PROXY=http://<corporate proxy>/" "HTTPS_PROXY="<corporate proxy>/" "NO_PROXY=localhost,127.0.0.1,.domain.local,.corp" 我使用build.sh shell脚本来构build图像: #/bin/bash docker build -t hgk/test-container . shell脚本与我的Dockerfile位于相同的位置。 这是目录中唯一的两件事情。 FROM openjdk:8 ARG KEYSERV=hkp://p80.pool.sks-keyservers.net:80 ARG THEPROXY=<my corporate proxy> # grab gosu for easy step-down from root # (see docker-sonarqube pull request #115) RUN set -x \ && wget […]

获取警告:nginx:无法打开监督/ ok:文件不存在

这是我的Dockerfile: #Docker file with Alpine + nginx as base image FROM docker-alpine #adding the runit setting of nginx to /etc/service ADD ./conf/nginx.runit /etc/service/nginx/run RUN apk update && \ apk upgrade && \ apk add –update \ runit \ nginx \ curl #create necessary dir #create users #remove cache RUN mkdir /etc/nginx/sites-enabled && \ adduser -u […]

docker-compose正试图访问proc文件

Docker-compose给了我这个错误,我不知道为什么: > docker-compose -f local.yml build Step 8/21 : RUN find . -type d -name __pycache__ -exec rm -r {} \+ —> Running in 9da1be4e2ae5 find: './proc/1/map_files': Operation not permitted find: './proc/6/map_files': Operation not permitted ERROR: Service 'base' failed to build: The command '/bin/sh -c find . -type d -name __pycache__ -exec rm -r {} […]

多个Docker从docker-compose .env文件构build参数

.env -compose的.env文件遇到了一个奇怪的问题。 我可以在我的.env文件中使用第一个variableskey = pair,但只能使用第一个variables。 这是我的文件夹结构 |- root | |- .env | |- docker-compose.yaml | |- service-1 | |- Dockerfile .ENV: GIT_TOKEN=c3e13c4e33935 DB_PWD=mypassword 泊坞窗,compose.yaml: version: '3' web-server: container_name: service-1 image: sdc/service-1:0.1 build: context: ./service-1 args: – GIT_TOKEN=$GIT_TOKEN – DB_PWD=$DB_PWD 服务-1 / Dockerfile: FROM node:boron ARG GIT_TOKEN ARG DB_PWD RUN git clone https://${GIT_TOKEN}@github.com/chrxn/sdc.git RUN echo {"database_password:" […]

Docker – 几个页面重新加载后,Mysqlclosures

我创build了一个docker-compo与mysql和lamp服务。 一切工作正常,我能够访问我的本地发展的URL。 我的应用程序是一个老的Drupal 6网站使用php5.3和MySQL 5.6。 我的mysql转储文件是1.5G。 当我首先访问我的local.dev网站时,该网站运行良好。 当我尝试访问另一个页面或重新加载时,mysql容器closures。 Apache容器运行良好。 错误是类似于这个报告,所以我也尝试了清除解决scheme。 https://github.com/docker-library/mysql/issues/37 也尝试增加php内存限制。 我的php.ini: error_reporting = E_ALL & ~E_DEPRECATED & ~E_NOTICE memory_limit = 1024M max_input_time = 240 max_execution_time = 240 我不确定这是否是我的计算机的内存限制或docker集装箱设置的问题。 我正在寻找使mysql始终运行的解决scheme。 这是我的docker-compose.yml version: '3' services: mdmysql: build: "./db/" environment: – MYSQL_ROOT_PASSWORD=dbpass – MYSQL_DATABASE=dbname mdcom: build: "./web/" ports: – "80:80" links: – mdmysql:mysql volumes: – /path/to/app:/var/www/production/drupal […]

无法findmagento2数据库configuration文件

我已经在使用docker文件的docker容器内build立了magento2。 现在我想自动化数据库设置过程,以便查找可以设置数据库configuration(如数据库名称,用户名和密码)的configuration文件。 读一些博客文章说,它可以在/app/etc/env.php但我无法find我的magento2安装目录下这些位置的env.php文件。 那些magento2的docker容器,如何在magento2安装后自动进行magento安装过程( build立数据库&创buildadmin帐户 )。 为什么env.php丢失或只有在初始数据库设置完成一次后才会出现。

Docker不能同时运行cron和Rails

我已经安装了whenever使用gem的cron任务,所有的crontab工作正常。 但是,当docker启动时,它不启动cron服务。 我需要进入容器,并运行cron来运行该服务。 我跟着其他问题和他们的指示,但他们似乎并没有为我工作。 Dockerfile FROM ruby:2.3.3 # setup /app as our working directory ENV RAILS_ROOT /app RUN mkdir -p $RAILS_ROOT # Set working directory, where the commands will be ran: WORKDIR $RAILS_ROOT # Replace shell with bash so we can source files RUN rm /bin/sh && ln -s /bin/bash /bin/sh # Set debconf to […]

Docker不运行dotnet sdk命令

我试着按照这个https://docs.docker.com/engine/examples/dotnetcore/运行我的Core 2应用程序 构build是正确的,但运行返回: 你的意思是运行dotnet SDK命令? 请从以下url安装dotnet SDK: http : //go.microsoft.com/fwlink/? LinkID=798306&clcid=0x409 我的Docker文件是实例文件的副本,但dll的名称。 OFc我有Core 2安装在Windows上,我可以运行与IIS的项目。 为什么会这样呢? 谢谢。

如何使用Docker从Nginx服务器提供HTML文件

问题 我有一个在docker中运行的Nginx容器。 它被configuration为侦听端口http:// localhost:80 。 当我inputurl到我的浏览器,我得到以下… 欢迎来到nginx! 如果你看到这个页面,nginx web服务器已经成功安装并正常工作。 需要进一步的configuration。 有关在线文档和支持,请参阅nginx.org。 商业支持可在nginx.com上find。 感谢您使用nginx。 问题继续 我想要nginx从我的公共目录提供我的html文件。 请看看我的项目图片… 项目图片: 项目目录 Nginx容器运行 我做了什么 从我的公共目录中运行以下docker命令… $ docker run -d –name chat-web -v $ PWD:/ var / www -p 80:80 nginx 从/ usr / local / bin,/ usr / private / varsearchnginx服务器的位置,以便我可以修改nginx.conf,如下面的后NGinx默认公共www位置中所述? 。 我无法findnginx服务器的位置。 提前感谢您花时间回答我的问题。 我真的很感激你