Renovate: Renovate fails to parse Dockerfile FROM when using custom registry:port

Created on 15 May 2019  路  7Comments  路  Source: renovatebot/renovate

What Renovate type are you using?
Renovate CLI

Describe the bug
Renovate fail to parse Dockerfile FROM when using custom registry:port

Did you see anything helpful in debug logs?

DEBUG: packageFiles with updates (repository=piail/renovate-test)
       "config": {
         "dockerfile": [
           {
             "packageFile": "Dockerfile",
             "manager": "dockerfile",
             "deps": [
               {
                 "depName": "registry.internal",
                 "currentFrom": "registry.internal:4567/docker/base/production/base:9.6-3-161",
                 "currentDepTag": "registry.internal:4567/docker/base/production/base:9.6-3-161",
                 "currentValue": "4567/docker/base/production/base",
                 "datasource": "docker",
                 "lineNumber": 0,
                 "fromPrefix": "FROM",
                 "fromSuffix": "",
                 "depType": "final",
                 "updates": [],
                 "warnings": [],
                 "skipReason": "unsupported-value"
               }
             ]
           }
         ]
       }

To Reproduce
Steps to reproduce the behavior:

  1. Create repository with a Dockerfile and a FROM like this:
    `FROM registry.internal:4567/docker/base/production/base:9.6-3-161
  2. Configure renovate cli to check this repo

Expected behavior
I expected renovate to parse the FROM clause and identify correctly the depName/currentValue used later in the process.

Additional context
I think the current tests are broken.

dockerfile priority-3-normal bug

All 7 comments

I would want to work on this issue as I need it fixed to properly evaluate renovate

@pyaillet actually I have it fixed and about to push it to master

Thanks for your offer though :)

I just realised it's a little harder than I first expected. I probably won't get back to it until 5-6 hours time, so feel free to raise a PR before that if you prefer. We need to handle both these cases:

FROM registry.internal:4567/docker/base/production/base
FROM registry.internal:4567/docker/base/production/base:9.6-3-161

Actually maybe I do have it solved now. Pushing in 5 minutes

:tada: This issue has been resolved in version 17.4.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Wow, this is fast :)
Thank you very much !

Was this page helpful?
0 / 5 - 0 ratings