jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-54407] docker exec fails within docker.image.inside because of empty environment variable name

Open
#589 0 comments 0 reactions 0 assignees View on GitHub
component:docker-workflow-plugin imported-jira-issue priority:major resolution:unresolved
Dominant language
Java
Stars
527
Forks
422
Avg merge
10m
Merged PRs (30d)
1

Description

There is an environment variable from unknown source which has an empty name. Jenkins would run a docker exec command to execute the content of an sh step within a docker.image.inside block. The docker exec command fails because of the environment variable.

I have written a wrapper bash script around the docker command which filters out the empty environment variable name. With this script in place the same Jenkinsfile runs sucessfully.

The environment variable does not appear on the global configure system page, neither on the agent page. Its value is 'build'.

---
Originally reported by hontvari, imported from: docker exec fails within docker.image.inside because of empty environment variable name


  • status: Open
  • priority: Major
  • component(s): docker-workflow-plugin
  • resolution: Unresolved
  • votes: 0
  • watchers: 1
  • imported: 2025-12-07

Raw content of original issue

There is an environment variable from unknown source which has an empty name. Jenkins would run a docker exec command to execute the content of an sh step within a docker.image.inside block. The docker exec command fails because of the environment variable.

I have written a wrapper bash script around the docker command which filters out the empty environment variable name. With this script in place the same Jenkinsfile runs sucessfully.

The environment variable does not appear on the global configure system page, neither on the agent page. Its value is 'build'.

  • environment: Jenkins ver. 2.138.2

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.