File: BUILDING.md

package info (click to toggle)
docker-compose 2.32.4-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,300 kB
  • sloc: makefile: 113; sh: 2
file content (92 lines) | stat: -rw-r--r-- 2,066 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92

### Prerequisites

* Windows:
  * [Docker Desktop](https://hub.docker.com/editions/community/docker-ce-desktop-windows)
  * make
* macOS:
  * [Docker Desktop](https://hub.docker.com/editions/community/docker-ce-desktop-mac)
  * make
* Linux:
  * [Docker 20.10 or later](https://docs.docker.com/engine/install/)
  * make

### Building the CLI

Once you have the prerequisites installed, you can build the CLI using:

```console
make
```

This will output a `docker-compose` CLI plugin for your host machine in
`./bin/build`.

You can statically cross compile the CLI for Windows, macOS, and Linux using the
`cross` target.

### Unit tests

To run all of the unit tests, run:

```console
make test
```

If you need to update a golden file simply do `go test ./... -test.update-golden`.

### End-to-end tests
To run e2e tests, the Compose CLI binary needs to be built. All the commands to run e2e tests propose a version
with the prefix `build-and-e2e` to first build the CLI before executing tests.

Note that this requires a local Docker Engine to be running.

#### Whole end-to-end tests suite

To execute both CLI and standalone e2e tests, run :

```console
make e2e
```

Or if you need to build the CLI, run:
```console
make build-and-e2e
```

#### Plugin end-to-end tests suite

To execute CLI plugin e2e tests, run :

```console
make e2e-compose
```

Or if you need to build the CLI, run:
```console
make build-and-e2e-compose
```

#### Standalone end-to-end tests suite

To execute the standalone CLI e2e tests, run :

```console
make e2e-compose-standalone
```

Or if you need to build the CLI, run:

```console
make build-and-e2e-compose-standalone
```

## Releases

To create a new release:
* Check that the CI is green on the main branch for the commit you want to release
* Run the release GitHub Actions workflow with a tag of form vx.y.z following existing tags.

This will automatically create a new tag, release and make binaries for
Windows, macOS, and Linux available for download on the
[releases page](https://github.com/docker/compose/releases).