如何使apt-get在docker文件中的Windows中运行? [英] how to make apt-get run in windows in docker file?

查看:219
本文介绍了如何使apt-get在docker文件中的Windows中运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何使这些dockerfile命令在Windows10上运行?我正在构建我的docker映像-我需要用Windows兼容的程序包管理器替换'apt-get'吗?

How to make these dockerfile commands run on windows10? I m building my docker image - do i need to replace 'apt-get' by windows-compatible package manager?

FROM python:3.6.5
RUN mkdir -p ./voice_flask/d
WORKDIR /voice_flask/d

COPY . /voice_flask/d
# RUN pip3 install llvmlite==0.31.0


RUN echo "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" >> /voice_flask/d/sources.list
RUN echo "deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-8 main" >> /voice_flask/d/sources.list

RUN apt-get install -y --no-install-recommends libedit-dev build-essential
RUN apt-get install -y --no-install-recommends  llvm-8 llvm-8-dev

RUN LLVM_CONFIG=/usr/bin/llvm-config-8 pip3 install enum34 llvmlite numba

#RUN pip install -r requirements.txt
CMD ["python", "server.py"]


推荐答案

在最新的Ubuntu上,llvmlite和numba直接通过pip3安装。

On the latest Ubuntu, llvmlite and numba installs directly with pip3.

以下是示例Dockerfile

Here's a sample Dockerfile

FROM ubuntu:latest
RUN apt-get update && apt-get -y install python3-pip
RUN pip3 install enum34 llvmlite numba
CMD ["/bin/echo", "hello world"]

内部版本: docker build。 -t llvm_docker

运行: docker run -t llvm_docker

输出: hello world

这篇关于如何使apt-get在docker文件中的Windows中运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆