Skip to content

Commit 39008c5

Browse files
committed
align with OCI artifact best practices
Signed-off-by: Nicolas De Loof <[email protected]>
1 parent 6ab41d6 commit 39008c5

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pkg/compose/publish.go

+6
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ import (
2020
"context"
2121
"encoding/json"
2222
"os"
23+
"path/filepath"
24+
"time"
2325

2426
"github.com/compose-spec/compose-go/types"
2527
"github.com/distribution/reference"
@@ -72,6 +74,7 @@ func (s *composeService) publish(ctx context.Context, project *types.Project, re
7274
Size: int64(len(f)),
7375
Annotations: map[string]string{
7476
"com.docker.compose.version": api.ComposeVersion,
77+
"com.docker.compose.file": filepath.Base(file),
7578
},
7679
}
7780
layers = append(layers, layer)
@@ -114,6 +117,9 @@ func (s *composeService) publish(ctx context.Context, project *types.Project, re
114117
ArtifactType: "application/vnd.docker.compose.project",
115118
Config: configDescriptor,
116119
Layers: layers,
120+
Annotations: map[string]string{
121+
"org.opencontainers.image.created": time.Now().Format(time.RFC3339),
122+
},
117123
})
118124
if err != nil {
119125
return err

0 commit comments

Comments
 (0)