Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated developer doc to explain external CLI #35681

Merged
merged 1 commit into from Dec 13, 2017

Conversation

javabrett
Copy link
Contributor

Need some doc on the move of the CLI to docker-ce, the included/locked/static CLI and how to replace it.

@javabrett javabrett force-pushed the docs-contributing-2 branch 2 times, most recently from e1dadd4 to e1936dc Compare December 2, 2017 08:28
@@ -187,13 +187,53 @@ can take over 15 minutes to complete.
hack/make.sh binary install-binary run
```

9. Inside your container, check your Docker version.
9. Inside your container, check your Docker versions by running both `docker --version` and `docker version`.
Copy link
Member

Choose a reason for hiding this comment

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

No need to run docker --version.
The client version is printed in docker version as well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed.

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.

Thank you @javabrett! I left some comments inline

```

Notice the split versions between client and server, which might be unexpected. In more recent times the Docker CLI component (which provides the `docker` command) has split out from the `moby` project and is now maintained in [docker/docker-ce](https://github.com/docker/docker-ce). The `moby` project now defaults to a [fixed version](https://github.com/docker/docker-ce/commits/v17.06.0-ce) of the `docker` CLI for integration tests.
Copy link
Member

Choose a reason for hiding this comment

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

Can you

  • wrap this paragraph to 80-chars?
  • remove the back-ticks around moby, and use a capital (in this case it's describing the name of the project, not a command)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and done.

DOCKER_CLI_PATH=/host/path/to/cli/binary make shell
then change the cli and compile into a binary at the same location.
```
By setting `DOCKER_CLI_PATH` you can supply a newer `docker` CLI to the server development container for testing and for `integration-cli` test-execution:
Copy link
Member

Choose a reason for hiding this comment

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

Can you wrap this to 80-chars as well?

Perhaps we should mention that the binary needs to be built separately, and must be a Linux binary (as it's used inside the container)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done and added a note about building that for Linux. Note that docker-ce doesn't have a lot of build-docs at the moment - not sure it's worth an issue since most folks will bumble their way through a make.

@GordonTheTurtle
Copy link

Please sign your commits following these rules:
https://github.com/moby/moby/blob/master/CONTRIBUTING.md#sign-your-work
The easiest way to do this is to amend the last commit:

$ git clone -b "docs-contributing-2" git@github.com:javabrett/moby.git somewhere
$ cd somewhere
$ git rebase -i HEAD~842357011432
editor opens
change each 'pick' to 'edit'
save the file and quit
$ git commit --amend -s --no-edit
$ git rebase --continue # and repeat the amend for each commit
$ git push -f

Amending updates the existing PR. You DO NOT need to open a new one.

@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Dec 5, 2017
@GordonTheTurtle GordonTheTurtle removed the dco/no Automatically set by a bot when one of the commits lacks proper signature label Dec 5, 2017
@javabrett
Copy link
Contributor Author

Anything else needed for this one?

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.

Sorry for the delay, I missed your previous comment; I left comments inline; can you also squash your commits (we don't need to preserve the review history as separate commits, just a single commit should be ok for this change) 👍

# docker --version
Docker version 17.09.0-dev, build
```
This Docker CLI should be build from the [docker-ce
Copy link
Member

Choose a reason for hiding this comment

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

Looks like you;

  • used a tab for indentation (but we standardise on space in this document)
  • also the subsequent lines are not indented

can you fix that here (and the other lines?); if it's helpful; here's the patch that you'd need;

diff --git a/docs/contributing/set-up-dev-env.md b/docs/contributing/set-up-dev-env.md
index 9568b4ca8..94cc957be 100644
--- a/docs/contributing/set-up-dev-env.md
+++ b/docs/contributing/set-up-dev-env.md
@@ -206,14 +206,14 @@ can take over 15 minutes to complete.
     OS/Arch:      linux/amd64
     Experimental: false
    ```
-   
-	 Notice the split versions between client and server, which might be
-unexpected. In more recent times the Docker CLI component (which provides the
-`docker` command) has split out from the Moby project and is now maintained in
-[docker/docker-ce](https://github.com/docker/docker-ce).  The Moby project now
-defaults to a [fixed
-version](https://github.com/docker/docker-ce/commits/v17.06.0-ce) of the
-`docker` CLI for integration tests.
+
+   Notice the split versions between client and server, which might be
+   unexpected. In more recent times the Docker CLI component (which provides
+   the `docker` command) has split out from the Moby project and is now
+   maintained in [docker/docker-ce](https://github.com/docker/docker-ce). The
+   Moby project now defaults to a [fixed
+   version](https://github.com/docker/docker-ce/commits/v17.06.0-ce) of the
+   `docker` CLI for integration tests.
 
    You may have noticed the following message when starting the container with the `shell` command:
    
@@ -222,10 +222,11 @@ version](https://github.com/docker/docker-ce/commits/v17.06.0-ce) of the
    DOCKER_CLI_PATH=/host/path/to/cli/binary make shell
    then change the cli and compile into a binary at the same location.
    ```
-	 By setting `DOCKER_CLI_PATH` you can supply a newer `docker` CLI to the
-server development container for testing and for `integration-cli`
-test-execution:
-   
+
+   By setting `DOCKER_CLI_PATH` you can supply a newer `docker` CLI to the
+   server development container for testing and for `integration-cli`
+   test-execution:
+
    ```none
    make DOCKER_CLI_PATH=/home/ubuntu/git/docker-ce/components/packaging/static/build/linux/docker/docker BIND_DIR=. shell
    ...
@@ -234,9 +235,11 @@ test-execution:
    # docker --version
    Docker version 17.09.0-dev, build 
    ```
-	 This Docker CLI should be build from the [docker-ce
-project](https://github.com/docker/docker-ce) and needs to be a Linux binary.
-   
+
+    This Docker CLI should be build from the [docker-ce
+    project](https://github.com/docker/docker-ce) and needs to be a Linux
+    binary.
+
    Inside the container you are running a development version. This is the version
    on the current branch. It reflects the value of the `VERSION` file at the
    root of your `docker-fork` repository.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks, done, and especially thanks for the patch 👍.

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.

LGTM, thanks!

@thaJeztah
Copy link
Member

ping @AkihiroSuda PTAL

Notice the split versions between client and server, which might be
unexpected. In more recent times the Docker CLI component (which provides
the `docker` command) has split out from the Moby project and is now
maintained in [docker/docker-ce](https://github.com/docker/docker-ce). The
Copy link
Member

Choose a reason for hiding this comment

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

Shouldnt we mention docker/cli repo?

Copy link
Member

Choose a reason for hiding this comment

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

oh, hm, yes, we probably should

was working on cherry-picks, so didn't even notice 😓

@GordonTheTurtle GordonTheTurtle added the dco/no Automatically set by a bot when one of the commits lacks proper signature label Dec 13, 2017
@GordonTheTurtle GordonTheTurtle removed the dco/no Automatically set by a bot when one of the commits lacks proper signature label Dec 13, 2017
Docker version 17.09.0-dev, build
```

This Docker CLI should be build from the [docker-ce
Copy link
Member

Choose a reason for hiding this comment

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

typo: build -> built

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed.

@AkihiroSuda
Copy link
Member

LGTM except typo

…moby->docker-ce.

Signed-off-by: Brett Randall <javabrett@gmail.com>
@AkihiroSuda AkihiroSuda merged commit b595858 into moby:master Dec 13, 2017
@javabrett javabrett deleted the docs-contributing-2 branch December 13, 2017 04:40
@thaJeztah
Copy link
Member

Thanks!!

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.

None yet

4 participants