Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker 生成的镜像不支持arm #454

Closed
webphper opened this issue Nov 22, 2022 · 12 comments
Closed

docker 生成的镜像不支持arm #454

webphper opened this issue Nov 22, 2022 · 12 comments

Comments

@webphper
Copy link

No description provided.

@jaywcjlove
Copy link
Owner

@webphper 我苹果 M1 支持,其它不知道怎么测试

@webphper
Copy link
Author

我的也是m1,能用。但是容器启动后,有不兼容的提示

@jaywcjlove
Copy link
Owner

image

我测试了一下可以的样子
@webphper

@jaywcjlove
Copy link
Owner

@webphper 尝试多平台编译都失败需要帮助,我本地启动没有问题

@jaywcjlove
Copy link
Owner

image

@webphper 测试好了,你可以测试一哈

@staugur
Copy link

staugur commented Mar 14, 2023

libcontainer: container start initialization failed: standard_init_linux.go:224: exec user process caused "exec format error"

standard_init_linux.go:224: exec user process caused "exec format error" 

虽然linux-command本身多架构支持arm,但是依赖的docker-static-website仅支持amd,所以还是报错。

或许可以试试joseluisq/static-web-server

@jaywcjlove
Copy link
Owner

joseluisq/static-web-server 这个有 2.36MB

lipanski/docker-static-website 只有 88 KB

@staugur

@staugur
Copy link

staugur commented Mar 14, 2023

关键它在ARM下报错,或许按照文章试试:

FROM busybox:1.36

# Create a non-root user to own the files and run our server
RUN adduser -D static
USER static
WORKDIR /home/static

# Copy the static website
# Use the .dockerignore file to control what ends up inside the image!
COPY ./.deploy .

# Run BusyBox httpd
CMD ["busybox", "httpd", "-f", "-v", "-p", "3000"]

jaywcjlove added a commit that referenced this issue Mar 14, 2023
@jaywcjlove
Copy link
Owner

@staugur 我将 https://hub.docker.com/r/wcjiang/docker-static-website 进行了重新编译

给它也编译了俩版本,不确定能否解决你的问题,欢迎帮忙测试一哈

image

@jaywcjlove
Copy link
Owner

@webphper 已经发布了,你重新测试一下看看?

$ docker pull wcjiang/linux-command:latest

@staugur
Copy link

staugur commented Mar 14, 2023

ARM架构下运行正常!
或许可以关闭 Issue

@jaywcjlove
Copy link
Owner

@staugur thx!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants