concourse / concourse/docker-image-resource

Unhelpful prints of variables

Open
#344 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
162
Forks
250
PR merge metrics
No merged PRs in 30d

Description

Hi friends,

The 2 first lines of my Dockerfile are:

ARG MYSQL_VERSION=5
FROM mysql:$MYSQL_VERSION

When I build this Dockerfile through the Concourse resource, with this configuration:

      build_args:
        email: ((docker_email))
        MYSQL_VERSION: 8

these are the logs we are getting:

Step 1/30 : ARG MYSQL_VERSION=5
Step 2/30 : FROM mysql:$MYSQL_VERSION

Which is quite confusing. It really appears like the build is using MySQL 5, but we validated that it's correctly using Mysql 8, as expected.

When we run the command locally with docker build . it shows the interpolated variable, which is a lot more user friendly.

@peterhaochen47 and I

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the Concourse resource invokes the Docker build and captures its output, then compare that output with the local docker build . logs for the Dockerfile example. Done means build logs show the interpolated MYSQL_VERSION value rather than the literal variable reference, without changing which image version is built.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker
Domain
devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.