Merged in bugfix/dockerbuild (pull request #149)
Doc Build Update * dockerbuild
This commit is contained in:
@@ -42,14 +42,10 @@ const (
|
||||
dockerfilePath = "build/Dockerfile"
|
||||
)
|
||||
|
||||
type ContainerLock struct {
|
||||
imageBuild sync.Once
|
||||
}
|
||||
|
||||
var containerLock = &ContainerLock{}
|
||||
var imageBuild sync.Once
|
||||
|
||||
func buildImage(t testing.TB, ctx context.Context) {
|
||||
containerLock.imageBuild.Do(func() {
|
||||
imageBuild.Do(func() {
|
||||
dockerContextPath, err := os.Getwd()
|
||||
require.NoError(t, err, "Failed to get current directory")
|
||||
|
||||
@@ -98,18 +94,20 @@ func buildImage(t testing.TB, ctx context.Context) {
|
||||
}
|
||||
|
||||
buildContext, err := archive.TarWithOptions(dockerContextPath, &archive.TarOptions{
|
||||
Compression: archive.Uncompressed,
|
||||
NoLchown: true,
|
||||
ExcludePatterns: excludePatterns,
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer buildContext.Close()
|
||||
|
||||
_, err = cli.ImageBuild(ctx, buildContext, types.ImageBuildOptions{
|
||||
out, err := cli.ImageBuild(ctx, buildContext, types.ImageBuildOptions{
|
||||
Dockerfile: dockerfilePath,
|
||||
Tags: []string{imageTag},
|
||||
})
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
err := out.Body.Close()
|
||||
require.NoError(t, err)
|
||||
}()
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,6 @@ includes:
|
||||
tasks:
|
||||
fullsuite:
|
||||
- task: build:deps
|
||||
- task: docker:build
|
||||
- task: fullsuite:test
|
||||
fullsuite:test:
|
||||
internal: true
|
||||
|
||||
Reference in New Issue
Block a user