我正在尝试将mono包安装到Docker容器上,但mono需要git,autoconf,libtool,automake,build-essential,mono-devel,gettext包.
我遇到的问题是libtool需要libc-dev,而libc-dev需要gcc编译器.
docker容器没有安装任何编译器,但我的本地机器没有.
arcolombo@acolombo:~/Documents/bedgraph_dockerfile$ dpkg --list |grep compiler
ii g++ 4:4.8.2-1ubuntu6 amd64 GNU C++ compiler
ii g++-4.8 4.8.2-19ubuntu1 amd64 GNU C++ compiler
ii gcc 4:4.8.2-1ubuntu6 amd64 GNU C compiler
ii gcc-4.8 4.8.2-19ubuntu1 amd64 GNU C compiler
ii hardening-includes 2.5ubuntu2.1 all Makefile for enabling compiler flags for security hardening
ii libllvm3.5:amd64 1:3.5-4ubuntu2~trusty2 amd64 Modular compiler and toolchain technologies, runtime library
ii libmono-compilerservices-symbolwriter4.0-cil 3.2.8+dfsg-4ubuntu1.1 all Mono.CompilerServices.SymbolWriter library (for CLI 4.0)
ii libxkbcommon0:amd64 0.4.1-0ubuntu1 amd64 library interface to the XKB compiler - shared …Run Code Online (Sandbox Code Playgroud) 我感兴趣的是让docker可以访问外部文件,但是,我不希望将它们作为卷包含在内.我需要访问的文件会随着时间的推移而改变,这意味着我需要重复重新安装.
除非,我可以挂载一个纯粹的目录,并且该目录中的任何内容也会被挂载.
我只需要将软件程序推入容器,在我的本地系统上"运行",此软件程序可以访问本地系统上的文件.
建议吗?除了添加需要作为卷处理的文件之外,还有其他方法吗?
我是Docker的新手,正在阅读特恩布尔的The Docker Book.从本质上讲,我掌握了容器如何工作的条款和过程以及图像在传输协议和虚拟化操作系统中的工作方式.
但是,我的dockerfile没有运行本地的可执行文件,我无法弄清楚如何将我的本地可执行文件添加到我的容器的/ bin目录中.
我的目标:我想将name.exe添加到容器的/ bin目录中.然后我想有一个docker文件
FROM ubuntu
MAINTAINER me@gmail.com
RUN ["name.exe", "input1", "output"]
Run Code Online (Sandbox Code Playgroud)
让我的容器运行我的程序,并创建一个输出.我的目标是让他们将我的容器放到我的仓库中,并与我编写的所有/ bin程序共享它.
但是,我无法这样做.
因此,我从 dockerfile 构建图像,使用 COPY 命令将本地文件从主机复制到我的容器中。构建映像后,我运行一个交互式 shell,并测试我复制的文件,但出现错误。
这是我的外壳信息。
arcolombo@arcolombo:~/Documents/bedgraph_dockerfile$ sudo docker info
Containers: 18
Images: 72
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Dirs: 108
Execution Driver: native-0.2
Kernel Version: 3.16.0-33-generic
Username: arcolombo
Registry: [https://index.docker.io/v1/]
WARNING: No swap limit support
Run Code Online (Sandbox Code Playgroud)
这是我的 docker 文件
FROM ubuntu
MAINTAINER anthonycolombo60@gmail.com
COPY software /bin
Run Code Online (Sandbox Code Playgroud)
请注意,在包含 Dockerfile 的目录下,我放置了“软件”目录,该目录在 Dockerfile 的上下文中具有 bedWiggle 可执行文件,因此它确实会加载到我的映像创建的新容器中。
这说明图像成功完成
arcolombo@arcolombo:~/Documents/bed_dockerfile$ sudo docker build -t="arcolombo" .
Sending build context to Docker daemon 2.7 MB
Sending build context to Docker daemon
Step 0 : FROM …Run Code Online (Sandbox Code Playgroud)