Closed manjeetsorout closed 1 year ago
i tried same, it works successfully. If you have too many images, you might be missing it. Try "docker run -it manjeet 28/catnip:latest" or "docker image inspect manjeet28/catnip:latest" command for understand that exist or not.
Hi there. @manjeetsorout can you run your docker build command and paste here the output from docker images?
docker build -t image_id .
docker images > output.txt
From the output of your docker version
and docker info
, I think you have the distro-package of Docker installed. Those versions are not maintained by us and there are some differences in how those packages are built. Unfortunately, I've seen various cases where those packages were broken (sometimes due to incompatible versions of build-dependencies being used in their builds)
Are you able to reproduce the problem on the official docker packages as well? https://docs.docker.com/engine/install/ubuntu/
@thaJeztah Unfortunately I have the same issue.
Do you have more details about your docker install, perhaps logs/output of the build, and steps to reproduce?
just add --load at the end of the commande
docker for windows wsl2 has the same issue
on latest version 3.0.0
I met the issue with the following system info:
cat /etc/os-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.7 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.7 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.7:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.7
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.7"
# docker version
Client: Docker Engine - Community
Version: 19.03.12
API version: 1.40
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:46:54 2020
OS/Arch: linux/amd64
Experimental: false
Server: Docker Engine - Community
Engine:
Version: 19.03.12
API version: 1.40 (minimum version 1.12)
Go version: go1.13.10
Git commit: 48a66213fe
Built: Mon Jun 22 15:45:28 2020
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.2.13
GitCommit: 7ad184331fa3e55e52b890ea95e65ba581ae3429
runc:
Version: 1.0.0-rc10
GitCommit: dc9208a3303feef5b3839f4323d9beb36df0a9dd
docker-init:
Version: 0.18.0
GitCommit: fec3683
Does the image show up if you run docker image inspect <name of your image>
?
Does the image show up if you run
docker image inspect <name of your image>
?
Nope.
I am also running into this issue with the following config:
Client:
Context: default
Debug Mode: false
Plugins:
app: Docker App (Docker Inc., v0.9.1-beta3)
buildx: Build with BuildKit (Docker Inc., v0.5.1-docker)
scan: Docker Scan (Docker Inc., v0.5.0)
Server:
Containers: 29
Running: 29
Paused: 0
Stopped: 0
Images: 8
Server Version: 20.10.5
Storage Driver: overlay2
Backing Filesystem: extfs
Supports d_type: true
Native Overlay Diff: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Cgroup Version: 1
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
Swarm: inactive
Runtimes: runc io.containerd.runc.v2 io.containerd.runtime.v1.linux
Default Runtime: runc
Init Binary: docker-init
containerd version: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc version: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
init version: de40ad0
Security Options:
seccomp
Profile: default
Kernel Version: 4.19.121-linuxkit
Operating System: Docker Desktop
OSType: linux
Architecture: x86_64
CPUs: 2
Total Memory: 5.81GiB
Name: docker-desktop
ID: XRTK:27XD:ESSD:WCVL:EMCE:HYVJ:5QM6:HDAB:SDZI:YLNL:OLD2:4IWT
Docker Root Dir: /var/lib/docker
Debug Mode: true
File Descriptors: 118
Goroutines: 107
System Time: 2021-04-22T21:28:24.479144159Z
EventsListeners: 4
HTTP Proxy: gateway.docker.internal:3128
HTTPS Proxy: gateway.docker.internal:3129
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
and docker version is:
Client: Docker Engine - Community
Cloud integration: 1.0.9
Version: 20.10.5
API version: 1.41
Go version: go1.13.15
Git commit: 55c4c88
Built: Tue Mar 2 20:13:00 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.5
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: 363e9a8
Built: Tue Mar 2 20:15:47 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.3
GitCommit: 269548fa27e0089a8b8278fc4fc781d7f65a939b
runc:
Version: 1.0.0-rc92
GitCommit: ff819c7e9184c13b7c2607fe6c30ae19403a7aff
docker-init:
Version: 0.19.0
GitCommit: de40ad0
I'm having the same issue.
These won't work, the all look like they build from cache
but don't register the new image with docker.
docker build .
docker buildx build --platform linux/amd64 --load .
docker buildx build --platform linux/amd64 --progress=plain --load .
How ever, the only command I can get to build is:
docker buildx build --progress=plain --load .
My issue is I need to specify --platform linux/amd64
as I'm on the apple m1
chipset. So am blocked here.
Client:
Cloud integration: 1.0.17
Version: 20.10.7
API version: 1.41
Go version: go1.16.4
Git commit: f0df350
Built: Wed Jun 2 11:56:23 2021
OS/Arch: darwin/arm64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.7
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: b0f5bc3
Built: Wed Jun 2 11:55:36 2021
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.4.6
GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d
runc:
Version: 1.0.0-rc95
GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
docker-init:
Version: 0.19.0
GitCommit: de40ad0
@daithi-coombes in your example, I see you're not setting -t
/ --tag
, which means no image will be tagged; can you see a new image appear if you docker build
/ docker buildx build
with a --tag
set?
Currently running into this issue in the latest docker for mac:
DOCKER_BUILDKIT=1 docker build -f Dockerfile --no-cache -t axis-relay:0.0.1 ..
[+] Building 18.9s (11/11) FINISHED
=> [internal] load build definition from Dockerfile 0.4s
=> => transferring dockerfile: 37B 0.3s
=> [internal] load .dockerignore 0.4s
=> => transferring context: 2B 0.3s
=> [internal] load metadata for docker.io/library/golang:1.16 0.0s
=> [builder 1/5] FROM docker.io/library/golang:1.16 0.0s
=> [internal] load build context 0.3s
=> => transferring context: 6.11kB 0.3s
=> CACHED [builder 2/5] WORKDIR /build 0.0s
=> [builder 3/5] COPY . . 0.1s
=> [builder 4/5] RUN go mod download 13.6s
=> [builder 5/5] RUN GOOS=linux CGO_ENABLED=0 go build -o relay ./relay 4.3s
=> [stage-1 1/2] COPY --from=builder /build/relay . 0.1s
=> exporting to image 0.1s
=> => exporting layers 0.1s
=> => writing image sha256:6b43580b1dc4738c81831a75bae5b5451b5fbbcc5e985f254353e1ed62528cbd 0.0s
=> => naming to docker.io/library/axis-relay:0.0.1 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
➜ relay git:(master) ✗ docker image ls -a
REPOSITORY TAG IMAGE ID CREATED SIZE
➜ relay git:(master) ✗ docker image inspect axis-relay:0.0.1
[]
Error: No such image: axis-relay:0.0.1
Docker Version:
Client:
Cloud integration: 1.0.17
Version: 20.10.7
API version: 1.41
Go version: go1.16.4
Git commit: f0df350
Built: Wed Jun 2 11:56:22 2021
OS/Arch: darwin/amd64
Context: default
Experimental: true
Server: Docker Engine - Community
Engine:
Version: 20.10.7
API version: 1.41 (minimum version 1.12)
Go version: go1.13.15
Git commit: b0f5bc3
Built: Wed Jun 2 11:54:58 2021
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.4.6
GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d
runc:
Version: 1.0.0-rc95
GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
docker-init:
Version: 0.19.0
GitCommit: de40ad0
@thaJeztah my bad I hadn't put the -t
flag in my comment. Issue was happening with the -t
flag.
@khumps I had to downgrade to docker desktop 3.4.0
and this (plus other) issues went away
What worked for me was to delete the previously-created version image. (With the same name/tag)
Currently running into this issue in the latest docker for mac:
DOCKER_BUILDKIT=1 docker build -f Dockerfile --no-cache -t axis-relay:0.0.1 .. [+] Building 18.9s (11/11) FINISHED => [internal] load build definition from Dockerfile 0.4s => => transferring dockerfile: 37B 0.3s => [internal] load .dockerignore 0.4s => => transferring context: 2B 0.3s => [internal] load metadata for docker.io/library/golang:1.16 0.0s => [builder 1/5] FROM docker.io/library/golang:1.16 0.0s => [internal] load build context 0.3s => => transferring context: 6.11kB 0.3s => CACHED [builder 2/5] WORKDIR /build 0.0s => [builder 3/5] COPY . . 0.1s => [builder 4/5] RUN go mod download 13.6s => [builder 5/5] RUN GOOS=linux CGO_ENABLED=0 go build -o relay ./relay 4.3s => [stage-1 1/2] COPY --from=builder /build/relay . 0.1s => exporting to image 0.1s => => exporting layers 0.1s => => writing image sha256:6b43580b1dc4738c81831a75bae5b5451b5fbbcc5e985f254353e1ed62528cbd 0.0s => => naming to docker.io/library/axis-relay:0.0.1 0.0s Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them ➜ relay git:(master) ✗ docker image ls -a REPOSITORY TAG IMAGE ID CREATED SIZE ➜ relay git:(master) ✗ docker image inspect axis-relay:0.0.1 [] Error: No such image: axis-relay:0.0.1
Docker Version:
Client: Cloud integration: 1.0.17 Version: 20.10.7 API version: 1.41 Go version: go1.16.4 Git commit: f0df350 Built: Wed Jun 2 11:56:22 2021 OS/Arch: darwin/amd64 Context: default Experimental: true Server: Docker Engine - Community Engine: Version: 20.10.7 API version: 1.41 (minimum version 1.12) Go version: go1.13.15 Git commit: b0f5bc3 Built: Wed Jun 2 11:54:58 2021 OS/Arch: linux/amd64 Experimental: false containerd: Version: 1.4.6 GitCommit: d71fcd7d8303cbf684402823e425e9dd2e99285d runc: Version: 1.0.0-rc95 GitCommit: b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7 docker-init: Version: 0.19.0 GitCommit: de40ad0
I am getting this same issue on MacOS M1 with Docker 20.10.7
(env) ➜ docker build . -f Dockerfile --tag my-image:0.0.1
[+] Building 533.5s (12/12) FINISHED
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 556B 0.0s
=> [internal] load .dockerignore 0.0s
[...]
=> exporting to image 3.8s
=> => exporting layers 3.8s
=> => writing image sha256:a0d1196b2332f31dab7c34ba48e1566f8fb0d9e103f49a6c94f5beca1f9a3230 0.0s
=> => naming to docker.io/library/my-image:0.0.1 0.0s
Use 'docker scan' to run Snyk tests against images to find vulnerabilities and learn how to fix them
(env) ➜ docker image inspect my-image:0.0.1
[]
Error: No such image: my-image:0.0.1
@thaJeztah my bad I hadn't put the
-t
flag in my comment. Issue was happening with the-t
flag. @khumps I had to downgrade to docker desktop3.4.0
and this (plus other) issues went away
How did you go about downgrading?
@khumps uninstall and re-install. For apple macs (silicon) I grabbed 3.4.0
from here: https://docs.docker.com/docker-for-mac/release-notes/#docker-desktop-340
@crazy-max PTAL - could this be if a custom (container) builder is set, and build is run without --load
?
same issue here!
same issue here
same issue here !!
It might be that you have done a docker buildx install
in the past so docker build
will be docker buildx build
and you have created a docker-container builder that will not load the image by default in docker store. If you could provide the output of the following commands, that would help to see what's wrong:
$ docker buildx ls
$ cat ~/.docker/config.json | jq '.aliases'
@crazy-max
I think we're getting a related issue: docker compose up -d --build some.service has been working fine. Since upgrading to docker desktop 4.6.1 the build is working but the image is not being recreated.
Causing quite the headache for our dev team.
Any thoughts based on the above?
docker compose up -d --build some.service
has been working fine. Since upgrading to docker desktop 4.6.1 the build is working but the image is not being recreated.
@totalitydevelopment I recently ran into an issue where docker compose up --build
built the image (docker image ls
showed a new image that was built), but when checking the container that was started, it was still running the old version of the image (docker ps
showed the image ID of the old build); if that's what you're running into, you can use the --force-recreate
option to make sure compose creates a new container that uses the latest build of the image.
Thanks @thaJeztah
One of the team has had that working so that's definately an option.
Would be good to understand/not need to, presumably the previous behaviour would have been the correct one?
Yes, I don't think it should be needed to pass that flag (at least not when --build
was used). I saw this behavior on compose v2.3.3
, and it worked as expected on v2.2.3
(IIRC), but haven't checked yet if it's fixed in compose v2.4.x
I checked with someone who's working on compose, and there was indeed an issue around this; see https://github.com/docker/compose/pull/9261 - that fix is in the compose v2.3.4 and above, and will be included in the next release of Docker Desktop (to be released soon)
@thaJeztah Great news. Thanks for looking into it and for the update.
Be nice to get the patch.
Same issue here. I build an image, with or without tag, and it completes successfully, but no image appears in Docker Desktop, even if I close and reopen it. If I run docker image ls
, though, the images do show up. Reinstalled Docker and the problem has gone away, for now at least.
got same issue for mac, not showing in docker images, but build no error
same issue for me as well on mac apple silicon, not showing in docker images or ps, build no error
exporting layers 9.6s => => writing image sha256:a73cf62e0ed8ad4125084887918209df5a9ddd75572af 0.0s => => naming to docker.io/library/money-api
I was seeing this problem. docker buildx ls
showed I had three builders including an unused one from a since-removed desktop-linux
install. I was currently using the third - not the default - that I had set up a long time ago.
docker buildx rm --all-inactive
removed the desktop linux one.
docker buildx use default
switched back to the original builder.
The same docker buildx build ... -t mytag .
that failed to leave anything that docker images ls
could find now works properly.
Not sure if this will work for anyone else, but hopefully it's a helpful data point.
This is with:
Docker version 20.10.16 build aa7e414
github.com/docker/buildx v0.8.2-docker 6224def4dd2c3d347eee19db595348c50d7cb491
Try this in ubuntu sudo docker image ls
same issue, "--no-cache" flag worked for me: $ docker build -t --no-cache myTag
Is the issue here possibly with Kubernetes doing image cleanups?
same issue
but solve the issue when upgrade version from 19.03.15
to 20.10.13
I was doing docker images ls
, when I should have been doing docker images -a
The --tag addition fixed it for me. Thank you.
I ran into the same problem using m1 from apple, docker version is 4.16.2 (95914) - Engine: 20.10.22, addint --tag didnt help, is there any update on this?
Try this in ubuntu sudo docker image ls
This got me to a solution to this problem - the mistake I made was doing:
sudo docker build
which builds an image only root can see - this won't appear in Docker Desktop.
Similarly it will force you to
sudo docker run
which also won't show up in Docker Desktop.
Rebuild and run without sudo and it works!
I believe the original issue described has been fixed. Please open a new issue with updated version information if you encounter this problem.
Small update on this one; looks like there were some cases where --load
(i.e., when using a containerised builder) could ignore failures to load the image into the Docker Engine image store. A fix was just merged in buildx for those, but hasn't shipped yet;
For clarity; this may be related to some cases mentioned here, but for some cases mentioned it may be unrelated.
Description i have successfully run docker build command but image does not show up in the docker images command.
Steps to reproduce the issue: Using the Dockerfile:
Describe the results you received: Successfully build builds image and exits successfully, but the image named "manjeet28/catnip:latest" does not show up in the docker images command.
Describe the results you expected: image should show up in the docker images command
Additional information you deem important (e.g. issue happens only occasionally):
Output of
docker version
:Output of
docker info
:Additional environment details (AWS, VirtualBox, physical, etc.): os : ubuntu 18.04