Skip to content

RUN instrument is not displayed correctly #22664

@liubin

Description

@liubin

If you are reporting a problem, please make sure the following information are provided:

Expected behavior and actual behavior:

With RUN instrument RUN date > /date.txt, the build history is shown as:

Image

The RUN is doubled.

Versions:
Please specify the versions of following systems.

  • harbor version: latest

Additional context:

additional returns:

    {
        "created": "2025-12-22T18:13:02.417331653+08:00",
        "created_by": "RUN /bin/sh -c date \u003e /date.txt # buildkit",
        "comment": "buildkit.dockerfile"
    }

Where /bin/sh -c is translated by RUN:

if (ele.created_by !== undefined) {
history.created_by = ele.created_by
.replace('/bin/sh -c #(nop)', '')
.trimLeft()
.replace('/bin/sh -c', 'RUN');
} else {

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions