Sign inSign up

ordar/helloword-arch1

By ordar

•Updated over 2 years ago

Image
0

154

ordar/helloword-arch1 repository overview

由 tonistiigi/binfmt + buildx 构建:
启动容器为:tonistiigi/binfmt
buildx version:github.com/docker/buildx v0.15.1 1c1dbb2e4cb5363110f42102744a08d034c2300d


现在有一个简单的 python程序源码:打印helloworld、系统信息、python版本。
$ cat helloword.py
import platform
print("helloworld")
print(platform.uname())

创建一个 Dockerfile 将该应用容器化:

$ cat Dockerfile
FROM python
ENV PYTHONUNBUFFERED=0
COPY helloworld.py /
CMD ["python","/helloworld.py"]

运行

docker run --privileged --platform=linux/arm64 ordar/helloword-arch1
docker run --privileged --platform=linux/amd64 ordar/helloword-arch1

Tag summary

Content type

Image

Digest

sha256:1ddf956ec…

Size

353.9 MB

Last updated

over 2 years ago

docker pull ordar/helloword-arch1