Skip to content

Fixing output in commandline RUN example#3273

Closed
guillaumebriday wants to merge 1 commit intodocker:masterfrom
guillaumebriday:patch-1
Closed

Fixing output in commandline RUN example#3273
guillaumebriday wants to merge 1 commit intodocker:masterfrom
guillaumebriday:patch-1

Conversation

@guillaumebriday
Copy link

Even if USER is defined, it should not be outputted because of the grep.

@codecov-commenter
Copy link

Codecov Report

Merging #3273 (86b2bc9) into master (1fdafcd) will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3273   +/-   ##
=======================================
  Coverage   57.99%   57.99%           
=======================================
  Files         302      302           
  Lines       21764    21764           
=======================================
  Hits        12621    12621           
  Misses       8219     8219           
  Partials      924      924           

Copy link
Member

@thaJeztah thaJeztah left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for contributing! (nice catch)

I left a comment inline; could you have a look and update your PR (if you agree with my suggestion)?

When doing so, please amend the existing commit (so that there's only a single commit in the PR); let me know if you need help doing so!

@@ -406,7 +406,6 @@ USER
$ docker run --env-file env.list ubuntu env | grep VAR
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So, the intent of this example was to show the environment variables, but only the relevant ones for this example, and to exclude env-vars like $PATH or $HOSTNAME.

Perhaps instead we should change the grep command;

$ docker run --env-file env.list ubuntu env | grep -E 'VAR|USER'

@thaJeztah
Copy link
Member

oh! It appears your commit message is missing a DCO sign-off,
causing the DCO check to fail.

We require all commit messages to have a Signed-off-by line with your name
and e-mail (see "Sign your work"
in the CONTRIBUTING.md in this repository), which looks something like:

Signed-off-by: YourFirsName YourLastName <yourname@example.org>

There is no need to open a new pull request, but to fix this (and make CI pass),
you need to amend the commit(s) in this pull request, and "force push" the amended
commit.

Unfortunately, it's not possible to do so through GitHub's web UI, so this needs
to be done through the git commandline.

You can find some instructions in the output of the DCO check (which can be found
in the "checks" tab on this pull request), as well as in the Moby contributing guide.

Steps to do so "roughly" come down to:

  1. Set your name and e-mail in git's configuration:

    git config --global user.name "YourFirstName YourLastName"
    git config --global user.email "yourname@example.org"

    (Make sure to use your real name (not your GitHub username/handle) and e-mail)

  2. Clone your fork locally

  3. Check out the branch associated with this pull request

  4. Sign-off and amend the existing commit(s)

    git commit --amend --no-edit --signoff

    If your pull request contains multiple commits, either squash the commits (if
    needed) or sign-off each individual commit.

  5. Force push your branch to GitHub (using the --force or --force-with-lease flags) to update the pull request.

Sorry for the hassle (I wish GitHub would make this a bit easier to do), and let me know if you need help or more detailed instructions!

@thaJeztah
Copy link
Member

Oh! I just noticed there's a pull request that makes the changes I suggested, and I merged that one (#2976) instead.

Thanks again for contributing, it's appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants