-
Notifications
You must be signed in to change notification settings - Fork 42
Labels
Milestone
Description
Code in Repo:
| FROM docker/whalesay:latest | |
| LABEL Name={{ serviceName }} Version={{ version }} | |
| RUN apt-get -y update && apt-get install -y fortunes | |
| CMD ["sh", "-c", "/usr/games/fortune -a | cowsay"] |
Just ran into this issue.
My setup:
M4 Macbook + VSCode + Blank workspace Folder + Container Tools
Running this step of the tutorial with "Other"(app platform) and "No" (docker compose files) option generates this code.
My workspace folder is docker-workspace, looks like it removes the '-' when creating which is fine.
FROM docker/whalesay:latest
LABEL Name=dockerworkspace Version=0.0.1
RUN apt-get -y update && apt-get install -y fortunes
CMD ["sh", "-c", "/usr/games/fortune -a | cowsay"]Using the Container Tools extension, right click "Build Image..." on the Dockerfile.
* Executing task: docker build --pull --rm -f 'Dockerfile' -t 'dockerworkspacegithubissuetest' '.'
[+] Building 0.9s (5/6) docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 253B 0.0s
=> [internal] load metadata for docker.io/docker/whalesay:latest 0.7s
=> [auth] docker/whalesay:pull token for registry-1.docker.io 0.0s
=> [internal] load .dockerignore 0.0s
=> => transferring context: 420B 0.0s
=> ERROR [1/2] FROM docker.io/docker/whalesay:latest@sha256:178598e51a26abbc958b8a2e48825c90bc22e641de3d31e18aaf55f3258b 0.1s
=> => resolve docker.io/docker/whalesay:latest@sha256:178598e51a26abbc958b8a2e48825c90bc22e641de3d31e18aaf55f3258ba93b 0.1s
------
> [1/2] FROM docker.io/docker/whalesay:latest@sha256:178598e51a26abbc958b8a2e48825c90bc22e641de3d31e18aaf55f3258ba93b:
------
1 warning found (use docker --debug to expand):
- InvalidBaseImagePlatform: Base image docker/whalesay:latest was pulled with platform "linux/amd64", expected "linux/arm64" for current build (line 1)
Dockerfile:1
--------------------
1 | >>> FROM docker/whalesay:latest
2 | LABEL Name=dockerworkspace Version=0.0.1
3 | RUN apt-get -y update && apt-get install -y fortunes
--------------------
ERROR: failed to solve: failed to load cache key: Pulling Schema 1 images have been deprecated and disabled by default since containerd v2.0. As a workaround you may set an environment variable `CONTAINERD_ENABLE_DEPRECATED_PULL_SCHEMA_1_IMAGE=1`, but this will be completely removed in containerd v2.1.
* The terminal process "/bin/zsh '-l', '-c', 'docker build --pull --rm -f 'Dockerfile' -t 'dockerworkspacegithubissuetest' '.''" terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it. I'm just doing some hobby projects and learning, but I thought I'd add to this issue with what I found this morning. Hope it helps!