Commit Graph

429 Commits

Author SHA1 Message Date
Nicolas De Loof a7424435b3 Restore compose v1 behavior to recreate containers when ran with -V
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-09-11 15:16:28 +02:00
Sebastiaan van Stijn d445ebba3f fix linting issues with golangci-lint 1.60.2
pkg/watch/watcher_darwin.go:96:16: Error return value of `d.stream.Start` is not checked (errcheck)
        d.stream.Start()
                      ^
    pkg/prompt/prompt.go:97:12: Error return value of `fmt.Fprint` is not checked (errcheck)
        fmt.Fprint(u.stdout, message)
                  ^
    pkg/prompt/prompt.go:99:12: Error return value of `fmt.Scanln` is not checked (errcheck)
        fmt.Scanln(&answer)
                  ^
    cmd/formatter/logs.go:118:15: Error return value of `fmt.Fprintf` is not checked (errcheck)
                fmt.Fprintf(w, "%s%s%s\n", p.prefix, timestamp, line)
                           ^
    cmd/formatter/logs.go:120:15: Error return value of `fmt.Fprintf` is not checked (errcheck)
                fmt.Fprintf(w, "%s%s\n", p.prefix, line)
                           ^
    pkg/progress/json.go:67:15: Error return value of `fmt.Fprintln` is not checked (errcheck)
            fmt.Fprintln(p.out, string(marshal))
                        ^
    pkg/progress/json.go:87:15: Error return value of `fmt.Fprintln` is not checked (errcheck)
            fmt.Fprintln(p.out, string(marshal))
                        ^
    pkg/progress/plain.go:47:14: Error return value of `fmt.Fprintln` is not checked (errcheck)
        fmt.Fprintln(p.out, prefix, e.ID, e.Text, e.StatusText)
                    ^
    pkg/progress/tty.go:162:12: Error return value of `fmt.Fprint` is not checked (errcheck)
        fmt.Fprint(w.out, b.Column(0).ANSI)
                  ^
    pkg/progress/tty.go:165:12: Error return value of `fmt.Fprint` is not checked (errcheck)
        fmt.Fprint(w.out, aec.Hide)
                  ^
    pkg/compose/attach.go:53:13: Error return value of `fmt.Fprintf` is not checked (errcheck)
        fmt.Fprintf(s.stdout(), "Attaching to %s\n", strings.Join(names, ", "))
                   ^
    pkg/compose/compose.go:194:6: emptyStringTest: replace `len(dependencies) > 0` with `dependencies != ""` (gocritic)
            if len(dependencies) > 0 {
               ^
    pkg/compose/convergence.go:461:2: builtinShadow: shadowing of predeclared identifier: max (gocritic)
        max := 0
        ^
    pkg/compose/run.go:127:5: emptyStringTest: replace `len(opts.User) > 0` with `opts.User != ""` (gocritic)
        if len(opts.User) > 0 {
           ^
    pkg/compose/run.go:139:5: emptyStringTest: replace `len(opts.WorkingDir) > 0` with `opts.WorkingDir != ""` (gocritic)
        if len(opts.WorkingDir) > 0 {
           ^
    pkg/compose/viz.go:91:8: emptyStringTest: replace `len(portConfig.HostIP) > 0` with `portConfig.HostIP != ""` (gocritic)
                    if len(portConfig.HostIP) > 0 {
                       ^
    cmd/compatibility/convert.go:66:6: emptyStringTest: replace `len(arg) > 0` with `arg != ""` (gocritic)
            if len(arg) > 0 && arg[0] != '-' {
               ^
    pkg/e2e/watch_test.go:208:25: printf: non-constant format string in call to gotest.tools/v3/poll.Continue (govet)
                return poll.Continue(res.Combined())
                                     ^
    pkg/e2e/watch_test.go:290:25: printf: non-constant format string in call to gotest.tools/v3/poll.Continue (govet)
                return poll.Continue(r.Combined())
                                     ^

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
2024-09-11 13:56:25 +02:00
Nathan Baulch 524a97e553 Fix typos
Signed-off-by: Nathan Baulch <nathan.baulch@gmail.com>
2024-09-11 11:21:24 +02:00
Suleiman Dibirov 98e261ba32 docs(wait): Fix wait command description
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-08-19 10:44:57 +02:00
Guillaume Lours 11c7a25ae9 allow to add empty line in the logs when nav menu activated
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-08-16 17:14:41 +02:00
Mayank Kapur 69384a9a0f Removes redundant condition from toAPIBuildOptions in build.go
Signed-off-by: Mayank Kapur <kapurm17@gmail.com>
2024-08-05 08:08:41 +02:00
guoguangwu 06bf339a42 fix: typos
Signed-off-by: guoguangwu <guoguangwug@gmail.com>
2024-07-17 13:48:13 +01:00
Nicolas De Loof d3d378b92a restore setEnvWithDotEnv
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-07-11 10:25:04 +02:00
Nicolas De Loof 25f85938bb exclude unnecessary resources after services have been selected
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-07-09 15:12:27 +02:00
Suleiman Dibirov 9549a213ba feat(watch): Add --prune option to docker-compose watch command
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-07-02 08:16:09 +02:00
Felix Fontein ace69c96a7 Use rawjson for the build backend.
Signed-off-by: Felix Fontein <felix@fontein.de>
2024-07-01 15:32:51 +02:00
Felix Fontein 2db04c1e40 Set logging format to JSON.
Signed-off-by: Felix Fontein <felix@fontein.de>
2024-07-01 15:32:51 +02:00
Felix Fontein 8f7cd00481 Format errors as JSON when in JSON progress mode.
Signed-off-by: Felix Fontein <felix@fontein.de>
2024-07-01 15:32:51 +02:00
Felix Fontein 5a6e1a7e2e Pass 'plain' instead of 'json' to build backend
Signed-off-by: Felix Fontein <felix@fontein.de>
2024-07-01 15:32:51 +02:00
Felix Fontein 06545d0668 Add JSON stream progress writer
Signed-off-by: Felix Fontein <felix@fontein.de>
2024-07-01 15:32:51 +02:00
Joana Hrotko de478f84b0 Add open watch docs in up menu
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-06-18 16:31:01 +01:00
Guillaume Lours 54a5e7d4aa stop watch process when associated up process is stopped
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-06-17 22:59:09 +02:00
Nicolas De Loof d633c33a19 config --environment
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-06-11 06:59:19 +02:00
Nicolas De Loof 10531f6302 Fix dot env file to define COMPOSE_* variables
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-06-08 14:55:36 +02:00
Guillaume Lours bf1bd3fc60 return an error when --detach and --watch are used together in up command
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-06-07 14:02:45 +02:00
Nicolas De Loof 7ad73c2899 fix opentelemetry
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-05-23 15:58:24 +02:00
Guillaume Lours 3635303372 add new navigation menu to open Compose app configuration in Docker Desktop
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-05-22 11:34:10 +02:00
Nicolas De Loof 5c6924ec6f fix --resolve-image-digests
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-05-22 10:54:55 +02:00
Nicolas De Loof 9e8c8caa2b allow a local .env file to override compose.yaml sibling .env
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-05-21 16:01:29 +02:00
Joana Hrotko b81624185f Add documentation for --menu up option and COMPOSE_MENU environemnt variable
Co-authored-by: Milas Bowman <devnull@milas.dev>
Signed-off-by: Joana H <joana.hrotko@gmail.com>
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-05-07 15:37:32 +02:00
Joana H 9c0b922597
fix: overlapping logs and menu navigation (#11765) 2024-04-24 14:59:42 -04:00
Nicolas De Loof 9970a84ae6
fix support for --context=foo
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-22 10:42:34 +02:00
Nicolas De Loof d239f0f318 check container_name is not in use by another service we will create
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-16 17:26:50 +02:00
Nicolas De Loof ca734ce565 don't clear line when navigation is disabled
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-16 16:04:23 +02:00
Nicolas De Loof b032999f06 read COMPOSE_REMOVE_ORPHANS from .env
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-11 16:24:15 +02:00
Nicolas De Loof 865a64afea introduce --all-resources to _not_ exclude resources not used by services
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-09 15:30:42 +02:00
Nicolas De Loof 29692b5921 Introduce --abort-on-container-failure
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-08 15:40:54 +02:00
Nicolas De Loof d71d8bce24 don't use ansi espace sequence when disabled
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-04-03 15:43:16 +02:00
Joana Hrotko ff20b641c7 Does not start keyboard manager if there is no tty
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-03-28 17:57:26 +00:00
Joana Hrotko 339b331a86 Change menu information text to dim
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-03-28 12:18:00 +00:00
Joana Hrotko dd5614ec3b Handle --no-build and --watch args
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-03-26 18:22:26 +00:00
Joana Hrotko e9dc82011f Add Navigation Menu to compose up
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-03-22 17:48:25 +01:00
Nicolas De Loof 25671ae622 introduce config --variables to list compose model variables
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-03-22 13:51:30 +01:00
Milas Bowman 1b5fa3b93f
feat(experiments): add experimental feature state (#11633)
Use environment variable for global opt-out and Docker Desktop (if
available) to determine specific experiment states.

In the future, we'll allow per-feature opt-in/opt-out via env vars
as well, but currently there is a single `COMPOSE_EXPERIMENTAL` env
var that can be used to opt-out of all experimental features
independently of Docker Desktop configuration.
2024-03-20 13:44:27 +00:00
Guillaume Lours 86cd52370a
Merge pull request #11630 from ndeloof/config_json
fix `compose config --format json`
2024-03-18 16:11:18 +01:00
Guillaume Lours 4f97edf355 reduce timeout of the Otel tracing command
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-03-18 08:40:36 +01:00
Nicolas De Loof bc5fc6ba7e
fix `compose config --format json`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-03-18 08:09:54 +01:00
Andrew Onyshchuk f46ca459d2 services shell completion bugfix
Signed-off-by: Andrew Onyshchuk <andryk.rv@gmail.com>
2024-03-15 10:47:30 +01:00
Nicolas De Loof 5a1ba0efcf only use ToModel when --no-interpolate is set
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-03-13 06:48:24 +01:00
Milas Bowman 17d4229e57
feat(desktop): add Docker Desktop detection and client skeleton (#11593) 2024-03-12 09:47:41 -04:00
Nicolas De Loof 8ab8df86e0 introduce --watch
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-02-28 19:04:58 +01:00
Nicolas De Loof de178267df move code into small functions for better readability
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-02-28 18:54:43 +01:00
Nicolas De Loof 1680f9a874 restore support for `config --no-interpolate`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-02-28 18:54:43 +01:00
Nicolas De Loof 58ec0e9fb6
get log to manage `attach`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-02-22 18:27:05 +01:00
Guillaume Lours 349d9f34d0 bump compose-go to version v2.0.0-rc.8
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-02-21 19:41:04 +01:00