docker images REPOSITORY TAG -6ren">
gpt4 book ai didi

docker - 我尝试构建一个使用 alpine linux 图像并打印 "Hello StackOverflow!"的简单图像。这里的问题是什么?

转载 作者:行者123 更新时间:2023-12-02 18:09:47 25 4
gpt4 key购买 nike

Windows PowerShell:

PS C:\Users\Administrator> docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
alpine latest d6e46aa2470d 13 days ago 5.57MB
alpine/git latest a8b6c5c0eb62 2 weeks ago 28.4MB

PS C:\Users\Administrator> docker build C:\dfiles
[+] Building 0.9s (2/2) FINISHED
=> [internal] load build definition from Dockerfile 0.6s
=> => transferring dockerfile: 2B 0.0s
=> [internal] load .dockerignore 0.8s
=> => transferring context: 2B 0.0s
failed to solve with frontend dockerfile.v0: failed to read dockerfile: open /var/lib/docker/tmp/buildkit-mount632819289/Dockerfile: no such file or directory

dockerfile存放路径:C:\dfiles

我的 Dockerfile.txt 中的代码:

FROM alpine
CMD ["echo", "Hello StackOverflow!"]

最佳答案

简单

仅使用 Dockerfile 而不使用 Dockerfile.txt

关于docker - 我尝试构建一个使用 alpine linux 图像并打印 "Hello StackOverflow!"的简单图像。这里的问题是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64678746/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com