Commit Graph

973 Commits

Author SHA1 Message Date
Joana Hrotko fbbd6f83d7 Avoid starting all services on rebuild
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-11-05 14:51:12 +00:00
Nicolas De Loof 513b6128c2 Service being declared in a profile must not trigger re-creation
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-11-05 10:49:08 +01:00
Joana Hrotko eececb9add Add profile e2e test case to document in compose
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-10-30 16:00:41 +01:00
Guillaume Lours 51ebeb5441 introduce generate command as alpha command
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-10-28 17:00:59 +01:00
Suleiman Dibirov fc9c3cde06 Add license header to dockerignore_test.go
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-10-28 12:26:45 +01:00
Suleiman Dibirov 73bfbab54b fix
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-10-28 12:26:45 +01:00
Suleiman Dibirov 2ac081b4c4 fix(dockerignore): Add wildcard support to dockerignore.go
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-10-28 12:26:45 +01:00
Chris Crone eeea049f17 push: Fix error message typo
Signed-off-by: Chris Crone <christopher.crone@docker.com>
2024-10-28 10:08:44 +01:00
Guillaume Lours 26064d4b60 allow usage of -f flag with oci Compose artifact
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-10-25 17:36:04 +02:00
Nicolas De Loof 7c46beb8af resurrect --all flag for cp to target oneoff container
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-25 16:59:19 +02:00
Nicolas De Loof aa1ec4524c connect to external networks by name
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-25 16:42:28 +02:00
Nicolas De Loof a4ee6ca7a5 don't warn about uid/gid not being supported while ... they are
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-25 12:48:00 +02:00
Nicolas De Loof fa24ab8e25 one-off container are not indexed, and must be ignored by exec --index command
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-22 15:29:12 +02:00
Nicolas De Loof 0aad9595a5 don't use progress to render restart, which hides logs
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-22 15:28:55 +02:00
Nicolas De Loof 813900180e compose-go clean volume target to avoid ambiguous comparisons
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-22 11:40:35 +02:00
Nicolas De Loof 82417bd5bc add support for bind.recursive
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-16 22:19:58 +02:00
divinity76 0cbb73c024 Improve error message to include expected network label
Updated the error message when a network is found with an incorrect label to also display the expected label value. This provides more context for debugging.

Signed-off-by: divinity76 <hans@loltek.net>
2024-10-15 15:33:16 +02:00
Nicolas De Loof 9eeb2d3154 convert gpus to DeviceRequests with implicit "gpu" capability
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-09 15:18:49 +02:00
Nicolas De Loof 15bd0b0c5f add support for raw env_file format
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-08 18:33:54 +02:00
Nicolas De Loof 3a95a0872d add support for CDI device request using `devices`
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-08 11:27:22 +02:00
Nicolas De Loof f794c79eb3 Support Dockerfile-specific ignore-file with watch
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-08 11:19:02 +02:00
Joana Hrotko 407d825705 Remove feature flag integration with Docker Desktop for ComposeUI and ComposeNav
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-10-07 20:08:12 +02:00
Nicolas De Loof 82b41b9ebd introduce service hooks
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-07 16:06:41 +02:00
Nicolas De Loof 6c06170eb0 pass device.options to engine
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-10-04 14:55:53 +02:00
MohammadHasan Akbari 60c1311f67 chore: remove errors depricated pkg
Signed-off-by: MohammadHasan Akbari <116190942+jarqvi@users.noreply.github.com>
Signed-off-by: MohammadHasan Akbari <jarqvi.jarqvi@gmail.com>
2024-10-02 21:15:59 +02:00
MohammadHasan Akbari bf0418bac1 fix: lint
Signed-off-by: MohammadHasan Akbari <116190942+jarqvi@users.noreply.github.com>
Signed-off-by: MohammadHasan Akbari <jarqvi.jarqvi@gmail.com>
2024-10-02 21:15:59 +02:00
MohammadHasan Akbari b9d0c77cde feat: add export command
Signed-off-by: MohammadHasan Akbari <jarqvi.jarqvi@gmail.com>
2024-10-02 21:15:59 +02:00
Ananta Dwi Prasetya Purna Yuda bdb8545611 fix(convergence): Serialize access to observed state
Signed-off-by: Ananta Dwi Prasetya Purna Yuda <hi@anantadwi13.com>
2024-10-02 15:04:38 +02:00
Joana Hrotko 41df35c1f4 Remove bind options when creating a volume type
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-10-02 10:00:28 +02:00
Suleiman Dibirov 87f457e7dc add tests to down.go
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-09-26 10:36:37 +02:00
Suleiman Dibirov abcc91e2b9 fix(down): Fix down command if specified services are not running
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-09-26 10:36:37 +02:00
Joana Hrotko 8b9fe89842 After container restart register printer consumer
Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
2024-09-24 14:01:51 +02:00
Nicolas De Loof 34b18194f7 check secret source exists, as bind mount would create target as a folder otherwise
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-09-23 19:36:41 +02:00
Nicolas De Loof ce27dba52e wait for dependent service up to delay set by --wait-timeout
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-09-23 18:25:02 +01:00
Nicolas De Loof d2b9456137 append unix-style relative path when computing container target path
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-09-20 17:00:23 +02:00
Guillaume Lours 9c60fe67df revert commits link to mount API over bind changes
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-09-20 10:37:57 +02:00
Nicolas De Loof c16df17e1f don't set propagation if target engine isn't linux
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-09-18 17:54:19 +02:00
Nicolas De Loof cb00aaad28 set propagation default
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-09-17 10:50:16 +02:00
Suleiman Dibirov 73d3a25ebd fix import
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-09-16 11:21:43 +02:00
Suleiman Dibirov 3524bcfad0 chore(watch): Add debug log when skipping service without build context
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-09-16 11:21:43 +02:00
Nicolas De Loof 1076f1d9a5 stop dependent containers before recreating diverged service
Signed-off-by: Nicolas De Loof <nicolas.deloof@gmail.com>
2024-09-16 10:14:54 +02:00
Suleiman Dibirov 8bf0627ea9 show sync files only in debug level
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-09-12 14:38:02 +02:00
Suleiman Dibirov 2e14191682 chore(watch): Add changed files path/count to log
Signed-off-by: Suleiman Dibirov <idsulik@gmail.com>
2024-09-12 14:38:02 +02:00
Guillaume Lours 8db0cba0af bump compose-go to version v2.2.0
Signed-off-by: Guillaume Lours <705411+glours@users.noreply.github.com>
2024-09-12 09:36:18 +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
Felix Fontein 1d608e0338 Use logrus instead of direct output to stderr.
Signed-off-by: Felix Fontein <felix@fontein.de>
2024-09-11 09:38:05 +02:00
Laura Brehm 329ad73922 attach: close streams when done
When Compose is watching a project/reattaching streams on container
start, it will make new API `ContainerAttach()` calls every time a
container it's watching is started. However, it only closes the stream
when the context used to start the attach is canceled.

This means that if a user has a project with multiple containers where
containers keep restarting, Compose will attach to the new containers
but never close the previous streams, causing fds to pile up and
goroutines on the engine to get stuck.

Signed-off-by: Laura Brehm <laurabrehm@hey.com>
2024-09-10 14:55:48 +02:00
jonathan-dev b633c5c3e1 Fix typo in pull.go
Signed-off-by: jonathan-dev <jonathan.drude@gmail.com>
2024-09-10 09:03:12 +02:00
Remco Kranenburg e6ef8629a8 Allow combination of bind mounts and 'rebuild' watches
Signed-off-by: Remco Kranenburg <remco.kranenburg@crunchr.com>
2024-09-04 07:41:37 +02:00