2021-09-26 19:01:38 +03:00
|
|
|
# Docker CLI
|
2017-05-03 23:27:10 +03:00
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
[![PkgGoDev](https://img.shields.io/badge/go.dev-docs-007d9c?logo=go&logoColor=white)](https://pkg.go.dev/github.com/docker/cli)
|
|
|
|
[![Build Status](https://img.shields.io/github/workflow/status/docker/cli/build?logo=github)](https://github.com/docker/cli/actions?query=workflow%3Abuild)
|
|
|
|
[![CircleCI Status](https://img.shields.io/circleci/build/github/docker/cli/master?logo=circleci)](https://circleci.com/gh/docker/cli/tree/master)
|
|
|
|
[![Go Report Card](https://goreportcard.com/badge/github.com/docker/cli)](https://goreportcard.com/report/github.com/docker/cli)
|
|
|
|
[![Codecov](https://codecov.io/gh/docker/cli/branch/master/graph/badge.svg)](https://codecov.io/gh/docker/cli)
|
|
|
|
|
|
|
|
## About
|
2017-04-18 00:49:33 +03:00
|
|
|
|
|
|
|
This repository is the home of the cli used in the Docker CE and
|
|
|
|
Docker EE products.
|
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
## Development
|
2017-04-25 19:57:06 +03:00
|
|
|
|
2017-05-14 20:24:10 +03:00
|
|
|
`docker/cli` is developed using Docker.
|
2017-04-25 19:57:06 +03:00
|
|
|
|
2021-03-06 01:20:02 +03:00
|
|
|
Build CLI from source:
|
2017-04-25 19:57:06 +03:00
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
```shell
|
|
|
|
docker buildx bake
|
2017-04-25 19:57:06 +03:00
|
|
|
```
|
|
|
|
|
2017-05-14 20:24:10 +03:00
|
|
|
Build binaries for all supported platforms:
|
2017-04-25 19:57:06 +03:00
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
```shell
|
|
|
|
docker buildx bake cross
|
2017-04-25 19:57:06 +03:00
|
|
|
```
|
|
|
|
|
2021-03-06 01:20:02 +03:00
|
|
|
Build for a specific platform:
|
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
```shell
|
|
|
|
docker buildx bake --set binary.platform=linux/arm64
|
2021-03-06 01:20:02 +03:00
|
|
|
```
|
|
|
|
|
|
|
|
Build dynamic binary for glibc or musl:
|
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
```shell
|
|
|
|
USE_GLIBC=1 docker buildx bake dynbinary
|
2021-03-06 01:20:02 +03:00
|
|
|
```
|
|
|
|
|
2017-05-14 20:24:10 +03:00
|
|
|
Run all linting:
|
2017-04-25 19:57:06 +03:00
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
```shell
|
|
|
|
docker buildx bake lint shellcheck
|
2017-04-25 19:57:06 +03:00
|
|
|
```
|
|
|
|
|
2017-07-19 18:44:39 +03:00
|
|
|
List all the available targets:
|
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
```shell
|
|
|
|
make help
|
2017-07-19 18:44:39 +03:00
|
|
|
```
|
|
|
|
|
2017-04-25 19:57:06 +03:00
|
|
|
### In-container development environment
|
|
|
|
|
2017-05-14 20:24:10 +03:00
|
|
|
Start an interactive development environment:
|
2017-04-25 19:57:06 +03:00
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
```shell
|
|
|
|
make -f docker.Makefile shell
|
2017-04-25 19:57:06 +03:00
|
|
|
```
|
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
## Legal
|
|
|
|
|
2017-04-18 00:49:33 +03:00
|
|
|
*Brought to you courtesy of our legal counsel. For more context,
|
|
|
|
please see the [NOTICE](https://github.com/docker/cli/blob/master/NOTICE) document in this repo.*
|
|
|
|
|
|
|
|
Use and transfer of Docker may be subject to certain restrictions by the
|
|
|
|
United States and other governments.
|
|
|
|
|
|
|
|
It is your responsibility to ensure that your use and/or transfer does not
|
|
|
|
violate applicable laws.
|
|
|
|
|
|
|
|
For more information, please see https://www.bis.doc.gov
|
|
|
|
|
2021-09-26 19:01:38 +03:00
|
|
|
## Licensing
|
|
|
|
|
2017-04-18 00:49:33 +03:00
|
|
|
docker/cli is licensed under the Apache License, Version 2.0. See
|
|
|
|
[LICENSE](https://github.com/docker/docker/blob/master/LICENSE) for the full
|
|
|
|
license text.
|