android模拟器容器,在docker容器中创建android模拟器时'sh:1:file:not found'('sh: 1: file: not found' when creating a a...

在docker容器中创建android模拟器时'sh:1:file:not found'('sh: 1: file: not found' when creating a android emulator inside a docker container)

我正在尝试在docker容器中创建一个android模拟器,但遇到了一些问题。

SDK更新和AVD创建成功,我尝试创建模拟器,出现以下错误:

./emulator -avd test-22 -no-skin -no-audio -no-window

sh: 1: file: not found

sh: 1: file: not found

WARNING: Cannot decide host bitness because $SHELL is not properly defined; 32 bits assumed.

ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them

注意:运行最后一个docker版本并使用java:8-jdk映像。

- 有些人告诉我为API22安装x86 intel ABI / ARM,但我无法找到包名,所以我可以通过命令行安装它。

I'm trying to create a android emulator inside a docker container but got some problems.

The SDK updates and AVD creation were successful and i try to create the emulator, the following error appears:

./emulator -avd test-22 -no-skin -no-audio -no-window

sh: 1: file: not found

sh: 1: file: not found

WARNING: Cannot decide host bitness because $SHELL is not properly defined; 32 bits assumed.

ERROR: 32-bit Linux Android emulator binaries are DEPRECATED, to use them

Notes: Running last docker version and using java:8-jdk image.

-- Some people told me to install a x86 intel ABI/ARM for the API22 but i cant manage to find the package name so i can install it by command line.

原文:https://stackoverflow.com/questions/37038320

更新时间:2020-06-08 21:06

最满意答案

我有同样的问题,我通过apt修复安装文件comman。 但是还没有工作,我会在找到解决方案时更新。

apt-get install -y --no-install-recommends file libmagic1 libglu1-mesa mesa-utils libpci3 pciutils libpulse0

编辑:我在将包添加到您的docker文件后找到了解决方案

添加您的docker文件这些命令也是如此

mv /bin/sh /bin/sh.backup

cp /bin/bash /bin/sh

并创建新的容器

--device /dev/dri --device /dev/video0 --device /dev/snd --device /dev/kvm

现在很可能是工作。

I have same issue and i fix this with install file comman via apt. But still not working yet, i will update when i found a solution.

apt-get install -y --no-install-recommends file libmagic1 libglu1-mesa mesa-utils libpci3 pciutils libpulse0

Edit: I found a solution after add packages to your docker file

add your docker file these commands too

mv /bin/sh /bin/sh.backup

cp /bin/bash /bin/sh

And create new container with

--device /dev/dri --device /dev/video0 --device /dev/snd --device /dev/kvm

Most probably is work now.

相关问答

更新: 所以现在的问题是: 没有回购或互联网连接,获得相同结果的最佳方法是什么? 您可以使用DockerHub上提供的各种非官方32位图像,搜索debian32 , ubuntu32 , fedora32等。 如果您不能信任它们,您可以自己构建这样的图像,并且您也可以在DockerHub上找到指令,例如: 在f69m/ubuntu32主页上,有一个指向用于生成图像的GitHub repo的链接; 在hugodby/fedora32主页上,有一个用于构建图像的命令示例; 等等。 或者,您可以根据某些

...

我建议如下: 创建容器时,将sql_dump_file.sql到/docker-entrypoint-initdb.d/ 。 官方的MariaDB映像将在启动时恢复它。 docker run -d --name -v d:/sql_dump_file.sql:/docker-entrypoint-initdb.d/sl_dump_file.sql

So a

...

在Windows 10和Docker for Windows beta上运行正常。 我会说一个过时的Docker设置或者你的机器上有东西被堵塞了。 如果您仍在运行boot2docker,请尝试切换到Docker for Windows 。 在旁注,任何时候我使用docker从linux主机它就像一个梦想,但Windows我总是失去与Windows特定问题摔跤的时间,npm安装似乎没有正常工作或挂起或需要多年,卷不在我的问题文件等。在windows / boot2docker上的docker是fub

...

如果你想实际映射你应该使用的端口 ivms:

build: .

container_name: ivms

command: bash bashes/createDB.sh

volumes:

- .:/code

ports:

- "8010:8010"

- "9001:9001" # now you can access them locally

警告您正在为这两个服务ivms和nginx使用相同的端口 EXPOSE指令通知Docker容器在运行时侦听

...

我决定离开詹金斯码头管道,改用原生码头突击队。 以下命令执行这个技巧。 注意:在任何情况下都不要使用git config部分! docker run --rm --privileged --name docker-builder \

-v /var/run/docker.sock:/var/run/docker.sock docker:dind \

/bin/sh -c 'apk add --no-cache git && \

git config --global http.sslVerify

...

1.-您启动的第一个容器(您启动另一个容器的容器)必须使用--privileged=true标志运行。 2.-我认为没有。 3.-使用特权标志,您不需要将docker套接字作为卷装入。 选中此项目即可查看所有这些示例。 1.- The first container you start (the one you launch other one inside) must be run with the --privileged=true flag. 2.- I think there is not

...

我不确定使用〜/ .profile配置文件是做你想要的最好的方法。 此外,使用RUN source /root/.profile将不会产生任何影响,因为该行仅执行一次,并且在尝试执行de容器内的bash二进制文件时不会持久。 (它实际上会运行一个新的bash会话)。 所以..首先,你要做的配置应该在.bashrc文件中(因为它通常出现在那里)。 然后,正如bash手册页所说: 当bash作为交互式登录shell或作为具有--login选项的非交互式shell调用时,它首先从文件/ etc / pr

...

我有同样的问题,我通过apt修复安装文件comman。 但是还没有工作,我会在找到解决方案时更新。 apt-get install -y --no-install-recommends file libmagic1 libglu1-mesa mesa-utils libpci3 pciutils libpulse0

编辑:我在将包添加到您的docker文件后找到了解决方案 添加您的docker文件这些命令也是如此 mv /bin/sh /bin/sh.backup

cp /bin/bash

...

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值