Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -957,10 +957,23 @@ services:
image: db
build:
context: ./db
shm_size: 2gb
`
configDetails := buildConfigDetails(dict, nil)
_, err := Load(configDetails)
actual, err := Load(configDetails)
assert.NilError(t, err)

wd, _ := os.Getwd()
assert.DeepEqual(t, actual.Services["web"].Build, &types.BuildConfig{
Context: wd,
Dockerfile: "Dockerfile",
})

assert.DeepEqual(t, actual.Services["db"].Build, &types.BuildConfig{
Context: filepath.Join(wd, "db"),
Dockerfile: "Dockerfile",
ShmSize: types.UnitBytes(2 * 1024 * 1024 * 1024),
})
}

func TestDeprecatedProperties(t *testing.T) {
Expand Down Expand Up @@ -2768,7 +2781,7 @@ services:
image: example/proxy
build: ./proxy
develop:
watch:
watch:
# rebuild image and recreate service
- path: ./proxy/proxy.conf
action: sync+restart
Expand Down
1 change: 1 addition & 0 deletions types/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ type BuildConfig struct {
Network string `yaml:"network,omitempty" json:"network,omitempty"`
Target string `yaml:"target,omitempty" json:"target,omitempty"`
Secrets []ServiceSecretConfig `yaml:"secrets,omitempty" json:"secrets,omitempty"`
ShmSize UnitBytes `yaml:"shm_size,omitempty" json:"shm_size,omitempty"`
Tags StringList `yaml:"tags,omitempty" json:"tags,omitempty"`
Ulimits map[string]*UlimitsConfig `yaml:"ulimits,omitempty" json:"ulimits,omitempty"`
Platforms StringList `yaml:"platforms,omitempty" json:"platforms,omitempty"`
Expand Down