MCPcopy Index your code
hub / github.com/docker/cli / services

Function services

cli/compose/loader/full-struct_test.go:31–393  ·  view source on GitHub ↗
(workingDir, homeDir string)

Source from the content-addressed store, hash-verified

29}
30
31func services(workingDir, homeDir string) []types.ServiceConfig {
32 return []types.ServiceConfig{
33 {
34 Name: "foo",
35
36 Build: types.BuildConfig{
37 Context: "./dir",
38 Dockerfile: "Dockerfile",
39 Args: map[string]*string{"foo": strPtr("bar")},
40 Target: "foo",
41 Network: "foo",
42 CacheFrom: []string{"foo", "bar"},
43 ExtraHosts: types.HostsList{
44 "ipv4.example.com:127.0.0.1",
45 "ipv6.example.com:::1",
46 },
47 Labels: map[string]string{"FOO": "BAR"},
48 },
49 CapAdd: []string{"ALL"},
50 CapDrop: []string{"NET_ADMIN", "SYS_ADMIN"},
51 CgroupParent: "m-executor-abcd",
52 Command: []string{"bundle", "exec", "thin", "-p", "3000"},
53 Configs: []types.ServiceConfigObjConfig{
54 {
55 Source: "config1",
56 },
57 {
58 Source: "config2",
59 Target: "/my_config",
60 UID: "103",
61 GID: "103",
62 Mode: uint32Ptr(0o440),
63 },
64 },
65 ContainerName: "my-web-container",
66 DependsOn: []string{"db", "redis"},
67 Deploy: types.DeployConfig{
68 Mode: "replicated",
69 Replicas: uint64Ptr(6),
70 Labels: map[string]string{"FOO": "BAR"},
71 RollbackConfig: &types.UpdateConfig{
72 Parallelism: uint64Ptr(3),
73 Delay: types.Duration(10 * time.Second),
74 FailureAction: "continue",
75 Monitor: types.Duration(60 * time.Second),
76 MaxFailureRatio: 0.3,
77 Order: "start-first",
78 },
79 UpdateConfig: &types.UpdateConfig{
80 Parallelism: uint64Ptr(3),
81 Delay: types.Duration(10 * time.Second),
82 FailureAction: "continue",
83 Monitor: types.Duration(60 * time.Second),
84 MaxFailureRatio: 0.3,
85 Order: "start-first",
86 },
87 Resources: types.Resources{
88 Limits: &types.ResourceLimit{

Callers 1

fullExampleConfigFunction · 0.85

Calls 4

uint64PtrFunction · 0.85
durationPtrFunction · 0.85
strPtrFunction · 0.70
uint32PtrFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…