Tag: apt get

在docker容器中找不到'make'命令

我有一个Docker镜像,运行Docker主机与Ubuntu 14.04。 在其中一个容器中,我试图运行zookeeper并为kafka安装librdkafka库(前提条件库)以连接到第三方软件。 我需要'make'命令在我将运行kafka适配器/连接器的容器内构build我的librdkafka库。 然而,有趣的是我不能在容器内运行“make”命令,它在docker主机上运行得很好。 当我尝试使用 apt-get install make 我收到下面的消息,这对我来说没什么意义: root@svi-esp-service:/# apt-get install make Reading package lists… Done Building dependency tree Reading state information… Done Package make is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source […]

在Docker构build过程中似乎完美安装的程序不在运行容器中

我有一个dockerfile似乎成功安装各种程序。 在这里,例如,我安装了sfdx-cli: RUN wget -O – https://developer.salesforce.com/media/salesforce-cli/sfdx-linux-amd64.tar.xz | tar Jxv && sfdx/install && rm -rf sfdx 我知道这是成功的,因为后续的行会导致它自行更新。 这里是另一个例子,我安装apt-transport-https: RUN apt-get install -y apt-transport-https 我知道这是有效的,因为下一行安装依赖apt-transport-https的heroku: RUN apt-get update && apt-get install -y heroku 但是,当我运行一个基于这个映像的容器时,sfdx-cli和apt-transport-https都不存在。 我使用“查找/”命令进行search,无法find它们,更不用说在他们预期的位置。 一般情况下容器运行良好,有许多项目在场和工作。 例如,“heroku”命令工作正常。 我显然错过了docker工作的基本方式,但是我在网上找不到任何关于这个的东西。 以下是当前的Dockerfile: https ://gist.github.com/alexed1/ad4917f53bed34318e1aa2801a82e911 这是我的构build命令: docker build . -t alexed1:dev5 这是我的运行命令: docker run -it -v /Users/aedelstein/Dropbox/dev:/home/alexed/dev \ -p 8000:8000 […]

使用apt-get build depm最小化Docker镜像

有时候在构buildDocker镜像时,有必要使用apt-get 。 例如,用于运行Magento的图像可能会像这样启动 FROM php:5.4-apache RUN apt-get -qqy update \ && apt-get -qqy install git \ libmcrypt-dev \ libpng12-dev \ libxml2-dev \ libxslt-dev \ && docker-php-ext-install bcmath \ gd \ mcrypt \ mysql \ soap \ xsl \ zip 但是现在我拥有那些apt-get命令带来的所有垃圾。 更糟的是,我甚至不知道我能够删除什么,因为大概是PHP库是dynamic链接的。 我正在考虑沿线等 有没有办法在docker-php-ext-install静态链接php库文件,这样我就可以将所有的apt-get删除了? 如何删除apt-get update留下的数据? 但这些只是XY的问题 。 我真正的问题只是 我如何构build更小的Docker镜像,而不必将Dockerfile中的apt-get的易用性和可维护性放在一起?

在docker中卸载应用程序?

我正在使用docker来构build和运行一组服务。 对于其中之一,我需要安装一些软件包以完成内部(gulp.js)构build过程,但是在最终的泊坞窗镜像中它们不是必需的。 似乎我应该卸载它们,同时build立docker图像,以保持图像更小。 这是否有一个标准的做法? 相关:docker图像的合理尺寸是多less? 我意识到“合理”是主观的,但1.4 GB的声音是否狂野? 这是我的Dockerfile,因为它现在存在: FROM python:3.5.1-onbuild ARG mode=dev ENV MODE $mode RUN apt-get update && apt-get install -y \ build-essential \ curl \ && rm -rf /var/lib/apt/lists/* RUN curl -sL https://deb.nodesource.com/setup_6.x | bash RUN apt-get install -y nodejs RUN cd $(npm root -g)/npm \ && npm install fs-extra \ && sed […]

允许DockercachingRUN结果

我有一个Dockerfile中的这些命令: RUN apt-get -y update #1 RUN apt-get -y install sudo #2 RUN sudo apt-get -y update #3 RUN sudo apt-get -y upgrade #4 RUN sudo apt-get install -y sqlite3 libsqlite3-dev #5 看起来好像Docker不能caching第3行或第4行 有没有一种方法可以让Docker以某种方式caching这些结果? 它每隔一段时间就会讲一两分钟更新/升级,这会让我发疯。

如何检查docker是由apt-get在Ubuntu安装?

我可以用curl -sSL https://get.docker.com/ | sh安装curl -sSL https://get.docker.com/ | sh curl -sSL https://get.docker.com/ | sh在unbuntu。 我读了这个脚本,发现以前的docker没有安装apt-get install docker-engine ,应该会有麻烦的。 为了改进脚本,如果docker没有通过apt-get安装,我想终止它。 我怎么知道docker是否由apt-get安装? Warning: the "docker" command appears to already exist on this system. If you already have Docker installed, this script can cause trouble, which is why we're displaying this warning and provide the opportunity to cancel […]

apt-get在Dockerfile中不起作用

解答 :我仍然不知道什么是错误的,但是在重新启动docker并重新运行后(同样的dockerfile,一切都一样),它工作正常。 我在Windows上使用Docker,我的Dockerfile是 FROM ubuntu:15.04 COPY . /src RUN apt-get update RUN apt-get install -y nodejs …etc 但是当我试图build立我得到的图像 WARN[0001] SECURITY WARNING: You are building a Docker image from Windows against a Linux Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions […]

Docker构buildinput/输出错误

对于docker工人来说,我相当陌生,所以我确信我犯了一些愚蠢的错误。 我正在尝试使用docker来设置一个环境,为我所需的库和依赖关系安装c ++。 但是,我似乎无法得到build立虚拟机。 我在OSX Yosemite上运行,我的安装过程如下: $ brew cask install virtualbox $ brew install docker-machine $ docker-machine create –driver virtualbox default $ eval "$(docker-machine env default)" 我已经能够成功地运行几个例子来validation。 但是,我无法运行以下MWE Dockerfile: FROM buildpack-deps:jessie-scm RUN apt-get update && apt-get install -y –no-install-recommends \ libboost-dev 我得到以下内容: $ docker build . docker build . Sending build context to Docker daemon […]

Dockerfile由于E:没有find版本x for y而失败

我写了下面的Dockerfile: FROM ubuntu:14.04 MAINTAINER X # Setup OS RUN apt-get update -y && apt-get upgrade -y RUN apt-get -y install python-software-properties RUN apt-get -y install software-properties-common RUN add-apt-repository ppa:nebc/bio-linux RUN apt-get update RUN apt-get install -y wget RUN apt-get install -y python-setuptools python-docutils python-pip #RUN pip install snakemake RUN apt-get install -y emboss=6.6.0+dfsg-2biolinux1 RUN apt-get […]

apt-get在基于Debian和Ubuntu的Docker镜像中失败

尝试在Debian或Ubuntu docker镜像中运行apt-get更新时出现这个奇怪的错误: root@60931d7602e1:/# apt-get update Ign http://security.debian.org jessie/updates InRelease Ign http://httpredir.debian.org jessie InRelease Ign http://security.debian.org jessie/updates Release.gpg Ign http://httpredir.debian.org jessie-updates InRelease Ign http://security.debian.org jessie/updates Release Ign http://httpredir.debian.org jessie Release.gpg Err http://security.debian.org jessie/updates/main amd64 Packages Ign http://httpredir.debian.org jessie-updates Release.gpg Err http://security.debian.org jessie/updates/main amd64 Packages Ign http://httpredir.debian.org jessie Release Err http://security.debian.org jessie/updates/main amd64 Packages Ign http://httpredir.debian.org jessie-updates […]