mirror of
https://github.com/docker/compose.git
synced 2025-10-12 10:58:55 +02:00
Elimneted magic string
Signed-off-by: keitosuwahara <keitosuwahara0816@gmail.com>
This commit is contained in:
parent
fe046915eb
commit
a926f7d717
@ -33,6 +33,7 @@ import (
|
|||||||
const (
|
const (
|
||||||
TransformerLabel = "com.docker.compose.bridge"
|
TransformerLabel = "com.docker.compose.bridge"
|
||||||
DefaultTransformerImage = "docker/compose-bridge-kubernetes"
|
DefaultTransformerImage = "docker/compose-bridge-kubernetes"
|
||||||
|
templatesPath = "/templates"
|
||||||
)
|
)
|
||||||
|
|
||||||
type CreateTransformerOptions struct {
|
type CreateTransformerOptions struct {
|
||||||
@ -73,7 +74,7 @@ func CreateTransformer(ctx context.Context, dockerCli command.Cli, options Creat
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
content, stat, err := dockerCli.Client().CopyFromContainer(ctx, created.ID, "/templates")
|
content, stat, err := dockerCli.Client().CopyFromContainer(ctx, created.ID, templatesPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
@ -82,7 +83,7 @@ func CreateTransformer(ctx context.Context, dockerCli command.Cli, options Creat
|
|||||||
}()
|
}()
|
||||||
|
|
||||||
srcInfo := archive.CopyInfo{
|
srcInfo := archive.CopyInfo{
|
||||||
Path: "/templates",
|
Path: templatesPath,
|
||||||
Exists: true,
|
Exists: true,
|
||||||
IsDir: stat.Mode.IsDir(),
|
IsDir: stat.Mode.IsDir(),
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user