Tag: dockerfile

如何使用docker将CSV数据导入到elasticsearch?

我在我的本地机器上跟随了ElasticStack_nyc_traffic_accidents的教程,并使其工作。 在本教程中,他们使用logstash命令将所有CSVlogging到elasticsearch中: cat mypath/nyc_collision_data.csv | <path_to_logstash>/bin/logstash -f nyc_collision_logstash.conf 我已经有一个docker-composeconfiguration的docker容器来获取我的elasticsearch,kibana和headPlugin作为服务。 我不明白的是,我是否需要下载另一个logstash的图像使其成为dockercompose中的服务,并以某种方式加载elasticsearch服务中的所有CSV数据? …或者我可以只使用elasticsearch服务和一个命令加载所有的CSV到elasticsearch? 我可以发布我的docker-compose.yml,elasticsearch.yml,kibana.yml和dockerfile与elasticsearch图像,如果需要的只是让我知道。

我怎样才能让我的nodeJS容器连接到我的mongoDB容器?

我有两个相当简单的Docker容器,一个包含一个NodeJS应用程序,另一个只是一个MongoDB容器。 Dockerfile.nodeJS FROM node:boron ENV NODE_ENV production # Create app directory RUN mkdir -p /node/api-server WORKDIR /node/api-server # Install app dependencies COPY /app-dir/package.json /node/api-server/ RUN npm install # Bundle app source COPY /app-dir /node/api-server EXPOSE 3000 CMD [ "node", "." ] Dockerfile.mongodb FROM mongo:3.4.4 # Create database storage directory VOLUME ["/data/db"] # Define working directory. […]

服务“networking”未能build立:lstat apache / sites-enabled / 000-default.conf:没有这样的文件或目录

我要 # Update the default apache site with the config we created. COPY ./apache/sites-enabled/000-default.conf /etc/apache2/sites-enabled/000-default.conf 我知道我的000-default.conf与Dockerfile不在同一个目录,这就是为什么我想打这样./apache/…但我仍然有错误。 结构体: dockerizing-django ├── apache │ └── sites-enabled │ └── 000-default.conf ├── docker-compose.yml ├── production.yml ├── README.md └── web ├── docker_django │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── Dockerfile ├── manage.py └── requirements.txt 和Dockerfile: […]

Golang docker library image在$ PATH中找不到工具

我在docker-library / golang#164上打开了一个问题,因为我认为这是个bug。 但是,我想我也会问在StackOverflow上看看是否有其他人(除了项目贡献者)遇到过这个问题或有什么想法? 首先,版本号: $ docker version Client: Version: 17.03.1-ce API version: 1.27 Go version: go1.7.5 Git commit: c6d412e Built: Tue Mar 28 00:40:02 2017 OS/Arch: darwin/amd64 Server: Version: 17.03.1-ce API version: 1.27 (minimum version 1.12) Go version: go1.7.5 Git commit: c6d412e Built: Fri Mar 24 00:00:50 2017 OS/Arch: linux/amd64 Experimental: true $ docker-compose […]

Docker-用服务env_file编写错误

我一直在努力通过一个.env文件将我的敏感数据(凭证)传递给docker集装箱。 我正在使用docker-compose,而我的docker-compose.yml文件如下所示: services: some-service: env_file: – .env 但是当我尝试做“docker-compose up”的时候,我得到了下面的错误: ERROR: In file './docker-compose.yml', service 'env_file' must be a mapping not an array. 我的.env文件有类似的数据 id = 1234567890 pwd = my_pwd 我的文件中是否有缩进错误? 任何build议如何解决这个错误?

docker工人 – 一个Dockerfile和docker-compose.yml上的多个项目

我从Docker开始,在我看来非常棒! 现在我正在寻找这个组织的解决scheme: 现在我有这样的结构: Applications | +–app1 | | +–node_modules | | +–package.json | | +–… | +–app2 | | +–node_modules | | +–package.json | | +–… | …. | docker-compose.app1.yml | docker-compose.app2.yml | …. | Dockerfile //my personalized image for all projects 但是我想达到这个: Applications | +–app1 | | +–node_modules //empty in host | | +–package.json […]

docker错误该命令非零代码:1 python

我有问题,当我试图build立容器。 而错误是: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1 我不知道为什么,我按照从文档的代码,但总是得到错误。 Dockerfile FROM python:2.7-slim # # # Set the working directory to /app WORKDIR /app # # # Copy the current directory contents into the container at /app ADD . /app # # # Install any needed packages specified in […]

在Docker中安装Meteor时,文件权限错误

我是Docker(2周)的新手,但是我正在为Meteor安装编写一个Dockerfile取得很好的进展。 现在我看到文件权限错误的最后一行。 老实说,我认为更广泛的问题是我不完全了解Linux文件系统和权限; 所以我会很感激任何指针。 这是错误的: Meteor 1.5 has been installed in your home directory (~/.meteor). Writing a launcher script to /usr/local/bin/meteor for your convenience. This may prompt for your password. sudo: no tty present and no askpass program specified Couldn't write the launcher script. Please either: (1) Run the following as root: cp "/home/.meteor/packages/meteor-tool/1.5.0/mt- os.linux.x86_64/scripts/admin/launch-meteor" […]

Dockerize angular-cli 4项目在尝试运行“ng build –aot –prod”时失败

我正在尝试使用以下docker文件dockerize我的angular-cli项目:我确实遵循了以下步骤: https://github.com/avatsaev/angular4-docker-example —- DOCKER文件—— FROM nginx:1.13-alpine ENV APP_PATH /app ENV PATH $APP_PATH/node_modules/@angular/cli/bin/:$PATH RUN apk add –update –no-cache nodejs && mkdir $APP_PATH && rm -rf /etc/nginx/conf.d/* WORKDIR $APP_PATH COPY . . COPY nginx/default.conf /etc/nginx/conf.d/ ARG NPM_TOKEN COPY .npmrc .npmrc COPY package.json package.json RUN npm install ng build –aot –prod \ && rm -rf /usr/share/nginx/html/* \ && […]

ImportError:没有模块在Docker中使用pip命名包

我使用Docker来构build我的应用程序。 我使用pip从requirements.txt安装软件包,但软件包不包含在构build中。 FROM python:3.4 WORKDIR /app ADD . /app RUN apt-get update && apt-get install -y \ python3-pip python-pip\ cron \ unixodbc \ unixodbc-dev \ python3-dev \ python3-setuptools \ && rm -rf /var/lib/apt/lists/* RUN pip install –upgrade pip RUN pip install sendgrid RUN pip3 install -r requirements.txt ENV CONFIG_ENV .env ADD validator-cron /etc/cron.d/validator-cron-job RUN chmod […]