jenkinsci / jenkinsci/docker-workflow-plugin

[JENKINS-42890] Could not find FROM instruction in Dockerfile when it starts with a BOM

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

Description

When building using pipeline definition as follows:

                        dir('src/MyProject') {

                            script {
                                def img = docker.build "mycompany/myproject:v0.0.${env.BUILD_NUMBER}"
                                docker.withRegistry('https://mycompany.azurecr.io/''mycompany.azurecr.io') {
                                    img.push()
                                    img.push 'latest'
                                }
                            }
                        }

The stage fails despite docker image built correctly.

---
Originally reported by mkubasz, imported from: Could not find FROM instruction in Dockerfile when it starts with a BOM


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

Raw content of original issue

When building using pipeline definition as follows:



                        dir('src/MyProject') {

                            script {
                                def img = docker.build "mycompany/myproject:v0.0.${env.BUILD_NUMBER}"
                                docker.withRegistry('https://mycompany.azurecr.io/''mycompany.azurecr.io') {
                                    img.push()
                                    img.push 'latest'
                                }
                            }
                        }


The stage fails despite docker image built correctly.

environment

```
Jenkins 2.49 on Ubuntu 16.04 on Azure VM.

Docker Commons Plugin - 1.6

Docker Pipeline - 1.10
```

2 attachments

- [Dockerfile](https://issues.jenkins.io/secure/attachment/36583/Dockerfile)
- [docker_error.png](https://issues.jenkins.io/secure/attachment/36582/docker_error.png)
> ![docker_error.png](https://issues.jenkins.io/secure/attachment/36582/docker_error.png)

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.