Skip to content

No event when building an untagged image #47463

@vvoland

Description

@vvoland

Description

Building an image with a tag results in ActionTag event being sent:

$ docker events &
$ printf 'FROM alpine\nRUN apk add vim' | docker build -t asdf -
...
2024-02-28T10:37:54.624937133Z image tag sha256:cdd546523a48d2c0932a32faa8c01abc3ebea2724d2571f713175964444d62bd (name=asdf:latest)

When building an untagged image:

$ printf 'FROM alpine\nRUN apk add vim' | docker build -

the event is not sent, because there's no tagging operation.

This makes it impossible to get a notification via events system when such image is built.

Reproduce

$ printf 'FROM alpine\nRUN apk add vim' | docker build -

Expected behavior

Building an untagged image should produce an event

docker version

Client:
 Version:           25.0.2
 API version:       1.44
 Go version:        go1.21.6
 Git commit:        29cf629
 Built:             Thu Feb  1 00:22:01 2024
 OS/Arch:           linux/arm64
 Context:           default

Server:
 Engine:
  Version:          dev
  API version:      1.45 (minimum version 1.24)
  Go version:       go1.21.7
  Git commit:       b37f8c8070832036d709bcf7d45bce8370b11321
  Built:            Wed Feb 28 10:38:12 2024
  OS/Arch:          linux/arm64
  Experimental:     false
 containerd:
  Version:          v1.7.13
  GitCommit:        7c3aca7a610df76212171d200ca3811ff6096eb8
 runc:
  Version:          1.1.12
  GitCommit:        v1.1.12-0-g51d5e94
 docker-init:
  Version:          0.19.0
  GitCommit:        de40ad0

docker info

Client:
 Version:    25.0.2
 Context:    default
 Debug Mode: false
 Plugins:
  buildx: Docker Buildx (Docker Inc.)
    Version:  v0.12.1
    Path:     /usr/local/libexec/docker/cli-plugins/docker-buildx
  compose: Docker Compose (Docker Inc.)
    Version:  v2.24.5
    Path:     /usr/libexec/docker/cli-plugins/docker-compose

Server:
 Containers: 0
  Running: 0
  Paused: 0
  Stopped: 0
 Images: 3
 Server Version: dev
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Using metacopy: false
  Native Overlay Diff: true
  userxattr: false
 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 splunk syslog
 Swarm: inactive
 Runtimes: io.containerd.runc.v2 runc crun
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7c3aca7a610df76212171d200ca3811ff6096eb8
 runc version: v1.1.12-0-g51d5e94
 init version: de40ad0
 Security Options:
  seccomp
   Profile: builtin
 Kernel Version: 6.6.16-linuxkit
 Operating System: Debian GNU/Linux 12 (bookworm) (containerized)
 OSType: linux
 Architecture: aarch64
 CPUs: 6
 Total Memory: 7.755GiB
 Name: 9300895d92be
 ID: 8f527aca-3d67-48c8-b911-e5e87981ac83
 Docker Root Dir: /var/lib/docker
 Debug Mode: true
  File Descriptors: 28
  Goroutines: 47
  System Time: 2024-02-28T11:06:40.026886584Z
  EventsListeners: 0
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

Additional Info

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions