status
stringclasses 1
value | repo_name
stringclasses 31
values | repo_url
stringclasses 31
values | issue_id
int64 1
104k
| title
stringlengths 4
233
| body
stringlengths 0
186k
⌀ | issue_url
stringlengths 38
56
| pull_url
stringlengths 37
54
| before_fix_sha
stringlengths 40
40
| after_fix_sha
stringlengths 40
40
| report_datetime
timestamp[us, tz=UTC] | language
stringclasses 5
values | commit_datetime
timestamp[us, tz=UTC] | updated_file
stringlengths 7
188
| chunk_content
stringlengths 1
1.03M
|
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
core/schema/container.go
|
Name string `json:"name"`
Value string `json:"value"`
}
func (s *containerSchema) envVariables(ctx *router.Context, parent *core.Container, args any) ([]EnvVariable, error) {
cfg, err := parent.ImageConfig(ctx)
if err != nil {
return nil, err
}
vars := make([]EnvVariable, 0, len(cfg.Env))
for _, v := range cfg.Env {
name, value, _ := strings.Cut(v, "=")
e := EnvVariable{
Name: name,
Value: value,
}
vars = append(vars, e)
}
return vars, nil
}
type containerVariableArgs struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
core/schema/container.go
|
Name string
}
func (s *containerSchema) envVariable(ctx *router.Context, parent *core.Container, args containerVariableArgs) (*string, error) {
cfg, err := parent.ImageConfig(ctx)
if err != nil {
return nil, err
}
for _, env := range cfg.Env {
name, val, ok := strings.Cut(env, "=")
if ok && name == args.Name {
return &val, nil
}
}
return nil, nil
}
type containerWithMountedDirectoryArgs struct {
Path string
Source core.DirectoryID
}
func (s *containerSchema) withMountedDirectory(ctx *router.Context, parent *core.Container, args containerWithMountedDirectoryArgs) (*core.Container, error) {
return parent.WithMountedDirectory(ctx, args.Path, &core.Directory{ID: args.Source})
}
type containerPublishArgs struct {
Address string
PlatformVariants []core.ContainerID
}
func (s *containerSchema) publish(ctx *router.Context, parent *core.Container, args containerPublishArgs) (string, error) {
return parent.Publish(ctx, args.Address, args.PlatformVariants, s.bkClient, s.solveOpts, s.solveCh)
}
type containerWithMountedFileArgs struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
core/schema/container.go
|
Path string
Source core.FileID
}
func (s *containerSchema) withMountedFile(ctx *router.Context, parent *core.Container, args containerWithMountedFileArgs) (*core.Container, error) {
return parent.WithMountedFile(ctx, args.Path, &core.File{ID: args.Source})
}
type containerWithMountedCacheArgs struct {
Path string
Cache core.CacheID
Source core.DirectoryID
}
func (s *containerSchema) withMountedCache(ctx *router.Context, parent *core.Container, args containerWithMountedCacheArgs) (*core.Container, error) {
var dir *core.Directory
if args.Source != "" {
dir = &core.Directory{ID: args.Source}
}
return parent.WithMountedCache(ctx, args.Path, args.Cache, dir)
}
type containerWithMountedTempArgs struct {
Path string
}
func (s *containerSchema) withMountedTemp(ctx *router.Context, parent *core.Container, args containerWithMountedTempArgs) (*core.Container, error) {
return parent.WithMountedTemp(ctx, args.Path)
}
type containerWithoutMountArgs struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
core/schema/container.go
|
Path string
}
func (s *containerSchema) withoutMount(ctx *router.Context, parent *core.Container, args containerWithoutMountArgs) (*core.Container, error) {
return parent.WithoutMount(ctx, args.Path)
}
func (s *containerSchema) mounts(ctx *router.Context, parent *core.Container, _ any) ([]string, error) {
return parent.Mounts(ctx)
}
type containerDirectoryArgs struct {
Path string
}
func (s *containerSchema) directory(ctx *router.Context, parent *core.Container, args containerDirectoryArgs) (*core.Directory, error) {
return parent.Directory(ctx, s.gw, args.Path)
}
type containerFileArgs struct {
Path string
}
func (s *containerSchema) file(ctx *router.Context, parent *core.Container, args containerFileArgs) (*core.File, error) {
return parent.File(ctx, s.gw, args.Path)
}
func absPath(workDir string, containerPath string) string {
if path.IsAbs(containerPath) {
return containerPath
}
if workDir == "" {
workDir = "/"
}
return path.Join(workDir, containerPath)
}
type containerWithSecretVariableArgs struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
core/schema/container.go
|
Name string
Secret core.SecretID
}
func (s *containerSchema) withSecretVariable(ctx *router.Context, parent *core.Container, args containerWithSecretVariableArgs) (*core.Container, error) {
return parent.WithSecretVariable(ctx, args.Name, &core.Secret{ID: args.Secret})
}
type containerWithMountedSecretArgs struct {
Path string
Source core.SecretID
}
func (s *containerSchema) withMountedSecret(ctx *router.Context, parent *core.Container, args containerWithMountedSecretArgs) (*core.Container, error) {
return parent.WithMountedSecret(ctx, args.Path, core.NewSecret(args.Source))
}
func (s *containerSchema) withDirectory(ctx *router.Context, parent *core.Container, args withDirectoryArgs) (*core.Container, error) {
return parent.WithDirectory(ctx, s.gw, args.Path, &core.Directory{ID: args.Directory}, args.CopyFilter)
}
func (s *containerSchema) withFile(ctx *router.Context, parent *core.Container, args withFileArgs) (*core.Container, error) {
return parent.WithFile(ctx, s.gw, args.Path, &core.File{ID: args.Source}, args.Permissions)
}
func (s *containerSchema) withNewFile(ctx *router.Context, parent *core.Container, args withNewFileArgs) (*core.Container, error) {
return parent.WithNewFile(ctx, s.gw, args.Path, []byte(args.Contents), args.Permissions)
}
type containerWithUnixSocketArgs struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
core/schema/container.go
|
Path string
Source core.SocketID
}
func (s *containerSchema) withUnixSocket(ctx *router.Context, parent *core.Container, args containerWithUnixSocketArgs) (*core.Container, error) {
return parent.WithUnixSocket(ctx, args.Path, core.NewSocket(args.Source))
}
type containerWithoutUnixSocketArgs struct {
Path string
}
func (s *containerSchema) withoutUnixSocket(ctx *router.Context, parent *core.Container, args containerWithoutUnixSocketArgs) (*core.Container, error) {
return parent.WithoutUnixSocket(ctx, args.Path)
}
func (s *containerSchema) platform(ctx *router.Context, parent *core.Container, args any) (specs.Platform, error) {
return parent.Platform()
}
type containerExportArgs struct {
Path string
PlatformVariants []core.ContainerID
}
func (s *containerSchema) export(ctx *router.Context, parent *core.Container, args containerExportArgs) (bool, error) {
if err := parent.Export(ctx, s.host, args.Path, args.PlatformVariants, s.bkClient, s.solveOpts, s.solveCh); err != nil {
return false, err
}
return true, nil
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
package dagger
import (
"context"
"dagger.io/dagger/internal/querybuilder"
"github.com/Khan/genqlient/graphql"
)
type CacheID string
type ContainerID string
type DirectoryID string
type FileID string
type Platform string
type SecretID string
type SocketID string
type BuildArg struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Name string `json:"name"`
Value string `json:"value"`
}
type CacheVolume struct {
q *querybuilder.Selection
c graphql.Client
}
func (r *CacheVolume) ID(ctx context.Context) (CacheID, error) {
q := r.q.Select("id")
var response CacheID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *CacheVolume) XXX_GraphQLType() string {
return "CacheVolume"
}
func (r *CacheVolume) XXX_GraphQLID(ctx context.Context) (string, error) {
id, err := r.ID(ctx)
if err != nil {
return "", err
}
return string(id), nil
}
type Container struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q *querybuilder.Selection
c graphql.Client
}
type ContainerBuildOpts struct {
Dockerfile string
BuildArgs []BuildArg
Target string
}
func (r *Container) Build(context *Directory, opts ...ContainerBuildOpts) *Container {
q := r.q.Select("build")
q = q.Arg("context", context)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Dockerfile) {
q = q.Arg("dockerfile", opts[i].Dockerfile)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].BuildArgs) {
q = q.Arg("buildArgs", opts[i].BuildArgs)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Target) {
q = q.Arg("target", opts[i].Target)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) DefaultArgs(ctx context.Context) ([]string, error) {
q := r.q.Select("defaultArgs")
var response []string
q = q.Bind(&response)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
return response, q.Execute(ctx, r.c)
}
func (r *Container) Directory(path string) *Directory {
q := r.q.Select("directory")
q = q.Arg("path", path)
return &Directory{
q: q,
c: r.c,
}
}
func (r *Container) Entrypoint(ctx context.Context) ([]string, error) {
q := r.q.Select("entrypoint")
var response []string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) EnvVariable(ctx context.Context, name string) (string, error) {
q := r.q.Select("envVariable")
q = q.Arg("name", name)
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) EnvVariables(ctx context.Context) ([]EnvVariable, error) {
q := r.q.Select("envVariables")
var response []EnvVariable
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type ContainerExecOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Args []string
Stdin string
RedirectStdout string
RedirectStderr string
ExperimentalPrivilegedNesting bool
}
func (r *Container) Exec(opts ...ContainerExecOpts) *Container {
q := r.q.Select("exec")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Args) {
q = q.Arg("args", opts[i].Args)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Stdin) {
q = q.Arg("stdin", opts[i].Stdin)
break
}
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].RedirectStdout) {
q = q.Arg("redirectStdout", opts[i].RedirectStdout)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].RedirectStderr) {
q = q.Arg("redirectStderr", opts[i].RedirectStderr)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].ExperimentalPrivilegedNesting) {
q = q.Arg("experimentalPrivilegedNesting", opts[i].ExperimentalPrivilegedNesting)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) ExitCode(ctx context.Context) (int, error) {
q := r.q.Select("exitCode")
var response int
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
}
type ContainerExportOpts struct {
PlatformVariants []*Container
}
func (r *Container) Export(ctx context.Context, path string, opts ...ContainerExportOpts) (bool, error) {
q := r.q.Select("export")
q = q.Arg("path", path)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].PlatformVariants) {
q = q.Arg("platformVariants", opts[i].PlatformVariants)
break
}
}
var response bool
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) File(path string) *File {
q := r.q.Select("file")
q = q.Arg("path", path)
return &File{
q: q,
c: r.c,
}
}
func (r *Container) From(address string) *Container {
q := r.q.Select("from")
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q = q.Arg("address", address)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) FS() *Directory {
q := r.q.Select("fs")
return &Directory{
q: q,
c: r.c,
}
}
func (r *Container) ID(ctx context.Context) (ContainerID, error) {
q := r.q.Select("id")
var response ContainerID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) XXX_GraphQLType() string {
return "Container"
}
func (r *Container) XXX_GraphQLID(ctx context.Context) (string, error) {
id, err := r.ID(ctx)
if err != nil {
return "", err
}
return string(id), nil
}
func (r *Container) Mounts(ctx context.Context) ([]string, error) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q := r.q.Select("mounts")
var response []string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type ContainerPipelineOpts struct {
Description string
}
func (r *Container) Pipeline(name string, opts ...ContainerPipelineOpts) *Container {
q := r.q.Select("pipeline")
q = q.Arg("name", name)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Description) {
q = q.Arg("description", opts[i].Description)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) Platform(ctx context.Context) (Platform, error) {
q := r.q.Select("platform")
var response Platform
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type ContainerPublishOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
PlatformVariants []*Container
}
func (r *Container) Publish(ctx context.Context, address string, opts ...ContainerPublishOpts) (string, error) {
q := r.q.Select("publish")
q = q.Arg("address", address)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].PlatformVariants) {
q = q.Arg("platformVariants", opts[i].PlatformVariants)
break
}
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) Rootfs() *Directory {
q := r.q.Select("rootfs")
return &Directory{
q: q,
c: r.c,
}
}
func (r *Container) Stderr(ctx context.Context) (string, error) {
q := r.q.Select("stderr")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) Stdout(ctx context.Context) (string, error) {
q := r.q.Select("stdout")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Container) User(ctx context.Context) (string, error) {
q := r.q.Select("user")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type ContainerWithDefaultArgsOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Args []string
}
func (r *Container) WithDefaultArgs(opts ...ContainerWithDefaultArgsOpts) *Container {
q := r.q.Select("withDefaultArgs")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Args) {
q = q.Arg("args", opts[i].Args)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithDirectoryOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Exclude []string
Include []string
}
func (r *Container) WithDirectory(path string, directory *Directory, opts ...ContainerWithDirectoryOpts) *Container {
q := r.q.Select("withDirectory")
q = q.Arg("path", path)
q = q.Arg("directory", directory)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Exclude) {
q = q.Arg("exclude", opts[i].Exclude)
break
}
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Include) {
q = q.Arg("include", opts[i].Include)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithEntrypoint(args []string) *Container {
q := r.q.Select("withEntrypoint")
q = q.Arg("args", args)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithEnvVariable(name string, value string) *Container {
q := r.q.Select("withEnvVariable")
q = q.Arg("name", name)
q = q.Arg("value", value)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithExecOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Stdin string
RedirectStdout string
RedirectStderr string
ExperimentalPrivilegedNesting bool
}
func (r *Container) WithExec(args []string, opts ...ContainerWithExecOpts) *Container {
q := r.q.Select("withExec")
q = q.Arg("args", args)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Stdin) {
q = q.Arg("stdin", opts[i].Stdin)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].RedirectStdout) {
q = q.Arg("redirectStdout", opts[i].RedirectStdout)
break
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].RedirectStderr) {
q = q.Arg("redirectStderr", opts[i].RedirectStderr)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].ExperimentalPrivilegedNesting) {
q = q.Arg("experimentalPrivilegedNesting", opts[i].ExperimentalPrivilegedNesting)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithFS(id *Directory) *Container {
q := r.q.Select("withFS")
q = q.Arg("id", id)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithFileOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Permissions int
}
func (r *Container) WithFile(path string, source *File, opts ...ContainerWithFileOpts) *Container {
q := r.q.Select("withFile")
q = q.Arg("path", path)
q = q.Arg("source", source)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Permissions) {
q = q.Arg("permissions", opts[i].Permissions)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithMountedCacheOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Source *Directory
}
func (r *Container) WithMountedCache(path string, cache *CacheVolume, opts ...ContainerWithMountedCacheOpts) *Container {
q := r.q.Select("withMountedCache")
q = q.Arg("path", path)
q = q.Arg("cache", cache)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Source) {
q = q.Arg("source", opts[i].Source)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithMountedDirectory(path string, source *Directory) *Container {
q := r.q.Select("withMountedDirectory")
q = q.Arg("path", path)
q = q.Arg("source", source)
return &Container{
q: q,
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
c: r.c,
}
}
func (r *Container) WithMountedFile(path string, source *File) *Container {
q := r.q.Select("withMountedFile")
q = q.Arg("path", path)
q = q.Arg("source", source)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithMountedSecret(path string, source *Secret) *Container {
q := r.q.Select("withMountedSecret")
q = q.Arg("path", path)
q = q.Arg("source", source)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithMountedTemp(path string) *Container {
q := r.q.Select("withMountedTemp")
q = q.Arg("path", path)
return &Container{
q: q,
c: r.c,
}
}
type ContainerWithNewFileOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Contents string
Permissions int
}
func (r *Container) WithNewFile(path string, opts ...ContainerWithNewFileOpts) *Container {
q := r.q.Select("withNewFile")
q = q.Arg("path", path)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Contents) {
q = q.Arg("contents", opts[i].Contents)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Permissions) {
q = q.Arg("permissions", opts[i].Permissions)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithRootfs(id *Directory) *Container {
q := r.q.Select("withRootfs")
q = q.Arg("id", id)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithSecretVariable(name string, secret *Secret) *Container {
q := r.q.Select("withSecretVariable")
q = q.Arg("name", name)
q = q.Arg("secret", secret)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithUnixSocket(path string, source *Socket) *Container {
q := r.q.Select("withUnixSocket")
q = q.Arg("path", path)
q = q.Arg("source", source)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithUser(name string) *Container {
q := r.q.Select("withUser")
q = q.Arg("name", name)
return &Container{
q: q,
c: r.c,
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
}
func (r *Container) WithWorkdir(path string) *Container {
q := r.q.Select("withWorkdir")
q = q.Arg("path", path)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithoutEnvVariable(name string) *Container {
q := r.q.Select("withoutEnvVariable")
q = q.Arg("name", name)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithoutMount(path string) *Container {
q := r.q.Select("withoutMount")
q = q.Arg("path", path)
return &Container{
q: q,
c: r.c,
}
}
func (r *Container) WithoutUnixSocket(path string) *Container {
q := r.q.Select("withoutUnixSocket")
q = q.Arg("path", path)
return &Container{
q: q,
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
c: r.c,
}
}
func (r *Container) Workdir(ctx context.Context) (string, error) {
q := r.q.Select("workdir")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type Directory struct {
q *querybuilder.Selection
c graphql.Client
}
func (r *Directory) Diff(other *Directory) *Directory {
q := r.q.Select("diff")
q = q.Arg("other", other)
return &Directory{
q: q,
c: r.c,
}
}
func (r *Directory) Directory(path string) *Directory {
q := r.q.Select("directory")
q = q.Arg("path", path)
return &Directory{
q: q,
c: r.c,
}
}
type DirectoryDockerBuildOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Dockerfile string
Platform Platform
BuildArgs []BuildArg
Target string
}
func (r *Directory) DockerBuild(opts ...DirectoryDockerBuildOpts) *Container {
q := r.q.Select("dockerBuild")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Dockerfile) {
q = q.Arg("dockerfile", opts[i].Dockerfile)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Platform) {
q = q.Arg("platform", opts[i].Platform)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].BuildArgs) {
q = q.Arg("buildArgs", opts[i].BuildArgs)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Target) {
q = q.Arg("target", opts[i].Target)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
type DirectoryEntriesOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Path string
}
func (r *Directory) Entries(ctx context.Context, opts ...DirectoryEntriesOpts) ([]string, error) {
q := r.q.Select("entries")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Path) {
q = q.Arg("path", opts[i].Path)
break
}
}
var response []string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Directory) Export(ctx context.Context, path string) (bool, error) {
q := r.q.Select("export")
q = q.Arg("path", path)
var response bool
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Directory) File(path string) *File {
q := r.q.Select("file")
q = q.Arg("path", path)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
return &File{
q: q,
c: r.c,
}
}
func (r *Directory) ID(ctx context.Context) (DirectoryID, error) {
q := r.q.Select("id")
var response DirectoryID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Directory) XXX_GraphQLType() string {
return "Directory"
}
func (r *Directory) XXX_GraphQLID(ctx context.Context) (string, error) {
id, err := r.ID(ctx)
if err != nil {
return "", err
}
return string(id), nil
}
func (r *Directory) LoadProject(configPath string) *Project {
q := r.q.Select("loadProject")
q = q.Arg("configPath", configPath)
return &Project{
q: q,
c: r.c,
}
}
type DirectoryPipelineOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Description string
}
func (r *Directory) Pipeline(name string, opts ...DirectoryPipelineOpts) *Directory {
q := r.q.Select("pipeline")
q = q.Arg("name", name)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Description) {
q = q.Arg("description", opts[i].Description)
break
}
}
return &Directory{
q: q,
c: r.c,
}
}
type DirectoryWithDirectoryOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Exclude []string
Include []string
}
func (r *Directory) WithDirectory(path string, directory *Directory, opts ...DirectoryWithDirectoryOpts) *Directory {
q := r.q.Select("withDirectory")
q = q.Arg("path", path)
q = q.Arg("directory", directory)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Exclude) {
q = q.Arg("exclude", opts[i].Exclude)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
if !querybuilder.IsZeroValue(opts[i].Include) {
q = q.Arg("include", opts[i].Include)
break
}
}
return &Directory{
q: q,
c: r.c,
}
}
type DirectoryWithFileOpts struct {
Permissions int
}
func (r *Directory) WithFile(path string, source *File, opts ...DirectoryWithFileOpts) *Directory {
q := r.q.Select("withFile")
q = q.Arg("path", path)
q = q.Arg("source", source)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Permissions) {
q = q.Arg("permissions", opts[i].Permissions)
break
}
}
return &Directory{
q: q,
c: r.c,
}
}
type DirectoryWithNewDirectoryOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Permissions int
}
func (r *Directory) WithNewDirectory(path string, opts ...DirectoryWithNewDirectoryOpts) *Directory {
q := r.q.Select("withNewDirectory")
q = q.Arg("path", path)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Permissions) {
q = q.Arg("permissions", opts[i].Permissions)
break
}
}
return &Directory{
q: q,
c: r.c,
}
}
type DirectoryWithNewFileOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Permissions int
}
func (r *Directory) WithNewFile(path string, contents string, opts ...DirectoryWithNewFileOpts) *Directory {
q := r.q.Select("withNewFile")
q = q.Arg("path", path)
q = q.Arg("contents", contents)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Permissions) {
q = q.Arg("permissions", opts[i].Permissions)
break
}
}
return &Directory{
q: q,
c: r.c,
}
}
func (r *Directory) WithTimestamps(timestamp int) *Directory {
q := r.q.Select("withTimestamps")
q = q.Arg("timestamp", timestamp)
return &Directory{
q: q,
c: r.c,
}
}
func (r *Directory) WithoutDirectory(path string) *Directory {
q := r.q.Select("withoutDirectory")
q = q.Arg("path", path)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
return &Directory{
q: q,
c: r.c,
}
}
func (r *Directory) WithoutFile(path string) *Directory {
q := r.q.Select("withoutFile")
q = q.Arg("path", path)
return &Directory{
q: q,
c: r.c,
}
}
type EnvVariable struct {
q *querybuilder.Selection
c graphql.Client
}
func (r *EnvVariable) Name(ctx context.Context) (string, error) {
q := r.q.Select("name")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *EnvVariable) Value(ctx context.Context) (string, error) {
q := r.q.Select("value")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type File struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q *querybuilder.Selection
c graphql.Client
}
func (r *File) Contents(ctx context.Context) (string, error) {
q := r.q.Select("contents")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *File) Export(ctx context.Context, path string) (bool, error) {
q := r.q.Select("export")
q = q.Arg("path", path)
var response bool
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *File) ID(ctx context.Context) (FileID, error) {
q := r.q.Select("id")
var response FileID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *File) XXX_GraphQLType() string {
return "File"
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
}
func (r *File) XXX_GraphQLID(ctx context.Context) (string, error) {
id, err := r.ID(ctx)
if err != nil {
return "", err
}
return string(id), nil
}
func (r *File) Secret() *Secret {
q := r.q.Select("secret")
return &Secret{
q: q,
c: r.c,
}
}
func (r *File) Size(ctx context.Context) (int, error) {
q := r.q.Select("size")
var response int
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *File) WithTimestamps(timestamp int) *File {
q := r.q.Select("withTimestamps")
q = q.Arg("timestamp", timestamp)
return &File{
q: q,
c: r.c,
}
}
type GitRef struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q *querybuilder.Selection
c graphql.Client
}
func (r *GitRef) Digest(ctx context.Context) (string, error) {
q := r.q.Select("digest")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type GitRefTreeOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
SSHKnownHosts string
SSHAuthSocket *Socket
}
func (r *GitRef) Tree(opts ...GitRefTreeOpts) *Directory {
q := r.q.Select("tree")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].SSHKnownHosts) {
q = q.Arg("sshKnownHosts", opts[i].SSHKnownHosts)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].SSHAuthSocket) {
q = q.Arg("sshAuthSocket", opts[i].SSHAuthSocket)
break
}
}
return &Directory{
q: q,
c: r.c,
}
}
type GitRepository struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q *querybuilder.Selection
c graphql.Client
}
func (r *GitRepository) Branch(name string) *GitRef {
q := r.q.Select("branch")
q = q.Arg("name", name)
return &GitRef{
q: q,
c: r.c,
}
}
func (r *GitRepository) Branches(ctx context.Context) ([]string, error) {
q := r.q.Select("branches")
var response []string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *GitRepository) Commit(id string) *GitRef {
q := r.q.Select("commit")
q = q.Arg("id", id)
return &GitRef{
q: q,
c: r.c,
}
}
func (r *GitRepository) Tag(name string) *GitRef {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q := r.q.Select("tag")
q = q.Arg("name", name)
return &GitRef{
q: q,
c: r.c,
}
}
func (r *GitRepository) Tags(ctx context.Context) ([]string, error) {
q := r.q.Select("tags")
var response []string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type Host struct {
q *querybuilder.Selection
c graphql.Client
}
type HostDirectoryOpts struct {
Exclude []string
Include []string
}
func (r *Host) Directory(path string, opts ...HostDirectoryOpts) *Directory {
q := r.q.Select("directory")
q = q.Arg("path", path)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Exclude) {
q = q.Arg("exclude", opts[i].Exclude)
break
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Include) {
q = q.Arg("include", opts[i].Include)
break
}
}
return &Directory{
q: q,
c: r.c,
}
}
func (r *Host) EnvVariable(name string) *HostVariable {
q := r.q.Select("envVariable")
q = q.Arg("name", name)
return &HostVariable{
q: q,
c: r.c,
}
}
func (r *Host) UnixSocket(path string) *Socket {
q := r.q.Select("unixSocket")
q = q.Arg("path", path)
return &Socket{
q: q,
c: r.c,
}
}
type HostWorkdirOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
Exclude []string
Include []string
}
func (r *Host) Workdir(opts ...HostWorkdirOpts) *Directory {
q := r.q.Select("workdir")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Exclude) {
q = q.Arg("exclude", opts[i].Exclude)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Include) {
q = q.Arg("include", opts[i].Include)
break
}
}
return &Directory{
q: q,
c: r.c,
}
}
type HostVariable struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q *querybuilder.Selection
c graphql.Client
}
func (r *HostVariable) Secret() *Secret {
q := r.q.Select("secret")
return &Secret{
q: q,
c: r.c,
}
}
func (r *HostVariable) Value(ctx context.Context) (string, error) {
q := r.q.Select("value")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type Project struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q *querybuilder.Selection
c graphql.Client
}
func (r *Project) Extensions(ctx context.Context) ([]Project, error) {
q := r.q.Select("extensions")
var response []Project
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Project) GeneratedCode() *Directory {
q := r.q.Select("generatedCode")
return &Directory{
q: q,
c: r.c,
}
}
func (r *Project) Install(ctx context.Context) (bool, error) {
q := r.q.Select("install")
var response bool
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Project) Name(ctx context.Context) (string, error) {
q := r.q.Select("name")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Project) Schema(ctx context.Context) (string, error) {
q := r.q.Select("schema")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Project) SDK(ctx context.Context) (string, error) {
q := r.q.Select("sdk")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Client) CacheVolume(key string) *CacheVolume {
q := r.q.Select("cacheVolume")
q = q.Arg("key", key)
return &CacheVolume{
q: q,
c: r.c,
}
}
type ContainerOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
ID ContainerID
Platform Platform
}
func (r *Client) Container(opts ...ContainerOpts) *Container {
q := r.q.Select("container")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].ID) {
q = q.Arg("id", opts[i].ID)
break
}
}
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Platform) {
q = q.Arg("platform", opts[i].Platform)
break
}
}
return &Container{
q: q,
c: r.c,
}
}
func (r *Client) DefaultPlatform(ctx context.Context) (Platform, error) {
q := r.q.Select("defaultPlatform")
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
var response Platform
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type DirectoryOpts struct {
ID DirectoryID
}
func (r *Client) Directory(opts ...DirectoryOpts) *Directory {
q := r.q.Select("directory")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].ID) {
q = q.Arg("id", opts[i].ID)
break
}
}
return &Directory{
q: q,
c: r.c,
}
}
func (r *Client) File(id FileID) *File {
q := r.q.Select("file")
q = q.Arg("id", id)
return &File{
q: q,
c: r.c,
}
}
type GitOpts struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
KeepGitDir bool
}
func (r *Client) Git(url string, opts ...GitOpts) *GitRepository {
q := r.q.Select("git")
q = q.Arg("url", url)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].KeepGitDir) {
q = q.Arg("keepGitDir", opts[i].KeepGitDir)
break
}
}
return &GitRepository{
q: q,
c: r.c,
}
}
func (r *Client) Host() *Host {
q := r.q.Select("host")
return &Host{
q: q,
c: r.c,
}
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
func (r *Client) HTTP(url string) *File {
q := r.q.Select("http")
q = q.Arg("url", url)
return &File{
q: q,
c: r.c,
}
}
type PipelineOpts struct {
Description string
}
func (r *Client) Pipeline(name string, opts ...PipelineOpts) *Client {
q := r.q.Select("pipeline")
q = q.Arg("name", name)
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].Description) {
q = q.Arg("description", opts[i].Description)
break
}
}
return &Client{
q: q,
c: r.c,
}
}
func (r *Client) Project(name string) *Project {
q := r.q.Select("project")
q = q.Arg("name", name)
return &Project{
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q: q,
c: r.c,
}
}
func (r *Client) Secret(id SecretID) *Secret {
q := r.q.Select("secret")
q = q.Arg("id", id)
return &Secret{
q: q,
c: r.c,
}
}
type SocketOpts struct {
ID SocketID
}
func (r *Client) Socket(opts ...SocketOpts) *Socket {
q := r.q.Select("socket")
for i := len(opts) - 1; i >= 0; i-- {
if !querybuilder.IsZeroValue(opts[i].ID) {
q = q.Arg("id", opts[i].ID)
break
}
}
return &Socket{
q: q,
c: r.c,
}
}
type Secret struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q *querybuilder.Selection
c graphql.Client
}
func (r *Secret) ID(ctx context.Context) (SecretID, error) {
q := r.q.Select("id")
var response SecretID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Secret) XXX_GraphQLType() string {
return "Secret"
}
func (r *Secret) XXX_GraphQLID(ctx context.Context) (string, error) {
id, err := r.ID(ctx)
if err != nil {
return "", err
}
return string(id), nil
}
func (r *Secret) Plaintext(ctx context.Context) (string, error) {
q := r.q.Select("plaintext")
var response string
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
type Socket struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 4,245 |
Implement labels for Dockerfile build
|
This allows a user to add labels the Dockerfile build
```graphql
input Label {
key: String!
value: String!
}
type Directory {
dockerBuild(dockerfile: String, platform: Platform, labels: [Label!]): Container!
}
```
|
https://github.com/dagger/dagger/issues/4245
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-12-21T20:35:16Z |
go
| 2023-01-19T18:15:20Z |
sdk/go/api.gen.go
|
q *querybuilder.Selection
c graphql.Client
}
func (r *Socket) ID(ctx context.Context) (SocketID, error) {
q := r.q.Select("id")
var response SocketID
q = q.Bind(&response)
return response, q.Execute(ctx, r.c)
}
func (r *Socket) XXX_GraphQLType() string {
return "Socket"
}
func (r *Socket) XXX_GraphQLID(ctx context.Context) (string, error) {
id, err := r.ID(ctx)
if err != nil {
return "", err
}
return string(id), nil
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
package core
import (
"context"
_ "embed"
"encoding/base64"
"errors"
"fmt"
"io"
"net"
"os"
"path/filepath"
"strings"
"testing"
"dagger.io/dagger"
"github.com/dagger/dagger/core"
"github.com/dagger/dagger/core/schema"
"github.com/dagger/dagger/internal/testutil"
"github.com/moby/buildkit/identity"
"github.com/stretchr/testify/require"
)
func TestContainerScratch(t *testing.T) {
t.Parallel()
res := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Container struct {
ID string
Fs struct {
Entries []string
}
}
}{}
err := testutil.Query(
`{
container {
id
fs {
entries
}
}
}`, &res, nil)
require.NoError(t, err)
require.Empty(t, res.Container.Fs.Entries)
}
func TestContainerFrom(t *testing.T) {
t.Parallel()
res := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Container struct {
From struct {
Fs struct {
File struct {
Contents string
}
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
fs {
file(path: "/etc/alpine-release") {
contents
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.From.Fs.File.Contents, "3.16.2\n")
}
func TestContainerBuild(t *testing.T) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
ctx := context.Background()
c, err := dagger.Connect(ctx)
require.NoError(t, err)
defer c.Close()
contextDir := c.Directory().
WithNewFile("main.go",
`package main
import "fmt"
import "os"
func main() {
for _, env := range os.Environ() {
fmt.Println(env)
}
}`)
t.Run("default Dockerfile location", func(t *testing.T) {
src := contextDir.
WithNewFile("Dockerfile",
`FROM golang:1.18.2-alpine
WORKDIR /src
COPY main.go .
RUN go mod init hello
RUN go build -o /usr/bin/goenv main.go
ENV FOO=bar
CMD goenv
`)
env, err := c.Container().Build(src).WithExec([]string{}).Stdout(ctx)
require.NoError(t, err)
require.Contains(t, env, "FOO=bar\n")
})
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
t.Run("custom Dockerfile location", func(t *testing.T) {
src := contextDir.
WithNewFile("subdir/Dockerfile.whee",
`FROM golang:1.18.2-alpine
WORKDIR /src
COPY main.go .
RUN go mod init hello
RUN go build -o /usr/bin/goenv main.go
ENV FOO=bar
CMD goenv
`)
env, err := c.Container().Build(src, dagger.ContainerBuildOpts{
Dockerfile: "subdir/Dockerfile.whee",
}).WithExec([]string{}).Stdout(ctx)
require.NoError(t, err)
require.Contains(t, env, "FOO=bar\n")
})
t.Run("subdirectory with default Dockerfile location", func(t *testing.T) {
src := contextDir.
WithNewFile("Dockerfile",
`FROM golang:1.18.2-alpine
WORKDIR /src
COPY main.go .
RUN go mod init hello
RUN go build -o /usr/bin/goenv main.go
ENV FOO=bar
CMD goenv
`)
sub := c.Directory().WithDirectory("subcontext", src).Directory("subcontext")
env, err := c.Container().Build(sub).WithExec([]string{}).Stdout(ctx)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
require.NoError(t, err)
require.Contains(t, env, "FOO=bar\n")
})
t.Run("subdirectory with custom Dockerfile location", func(t *testing.T) {
src := contextDir.
WithNewFile("subdir/Dockerfile.whee",
`FROM golang:1.18.2-alpine
WORKDIR /src
COPY main.go .
RUN go mod init hello
RUN go build -o /usr/bin/goenv main.go
ENV FOO=bar
CMD goenv
`)
sub := c.Directory().WithDirectory("subcontext", src).Directory("subcontext")
env, err := c.Container().Build(sub, dagger.ContainerBuildOpts{
Dockerfile: "subdir/Dockerfile.whee",
}).WithExec([]string{}).Stdout(ctx)
require.NoError(t, err)
require.Contains(t, env, "FOO=bar\n")
})
t.Run("with build args", func(t *testing.T) {
src := contextDir.
WithNewFile("Dockerfile",
`FROM golang:1.18.2-alpine
ARG FOOARG=bar
WORKDIR /src
COPY main.go .
RUN go mod init hello
RUN go build -o /usr/bin/goenv main.go
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
ENV FOO=$FOOARG
CMD goenv
`)
env, err := c.Container().Build(src).WithExec([]string{}).Stdout(ctx)
require.NoError(t, err)
require.Contains(t, env, "FOO=bar\n")
env, err = c.Container().Build(src, dagger.ContainerBuildOpts{BuildArgs: []dagger.BuildArg{{Name: "FOOARG", Value: "barbar"}}}).WithExec([]string{}).Stdout(ctx)
require.NoError(t, err)
require.Contains(t, env, "FOO=barbar\n")
})
t.Run("with target", func(t *testing.T) {
src := contextDir.
WithNewFile("Dockerfile",
`FROM golang:1.18.2-alpine AS base
CMD echo "base"
FROM base AS stage1
CMD echo "stage1"
FROM base AS stage2
CMD echo "stage2"
`)
output, err := c.Container().Build(src).WithExec([]string{}).Stdout(ctx)
require.NoError(t, err)
require.Contains(t, output, "stage2\n")
output, err = c.Container().Build(src, dagger.ContainerBuildOpts{Target: "stage1"}).WithExec([]string{}).Stdout(ctx)
require.NoError(t, err)
require.Contains(t, output, "stage1\n")
require.NotContains(t, output, "stage2\n")
})
}
func TestContainerWithRootFS(t *testing.T) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
t.Parallel()
ctx := context.Background()
c, err := dagger.Connect(ctx)
require.NoError(t, err)
defer c.Close()
alpine316 := c.Container().From("alpine:3.16.2")
alpine316ReleaseStr, err := alpine316.File("/etc/alpine-release").Contents(ctx)
require.NoError(t, err)
alpine316ReleaseStr = strings.TrimSpace(alpine316ReleaseStr)
dir := alpine316.Rootfs()
exitCode, err := c.Container().WithEnvVariable("ALPINE_RELEASE", alpine316ReleaseStr).WithRootfs(dir).WithExec([]string{
"/bin/sh",
"-c",
"test -f /etc/alpine-release && test \"$(head -n 1 /etc/alpine-release)\" = \"$ALPINE_RELEASE\"",
}).ExitCode(ctx)
require.NoError(t, err)
require.Equal(t, exitCode, 0)
alpine315 := c.Container().From("alpine:3.15.6")
varVal := "testing123"
alpine315WithVar := alpine315.WithEnvVariable("DAGGER_TEST", varVal)
varValResp, err := alpine315WithVar.EnvVariable(ctx, "DAGGER_TEST")
require.NoError(t, err)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
require.Equal(t, varVal, varValResp)
alpine315ReplacedFS := alpine315WithVar.WithRootfs(dir)
varValResp, err = alpine315ReplacedFS.EnvVariable(ctx, "DAGGER_TEST")
require.NoError(t, err)
require.Equal(t, varVal, varValResp)
releaseStr, err := alpine315ReplacedFS.File("/etc/alpine-release").Contents(ctx)
require.NoError(t, err)
require.Equal(t, "3.16.2\n", releaseStr)
}
func TestContainerExecExitCode(t *testing.T) {
t.Parallel()
res := struct {
Container struct {
From struct {
WithExec struct {
ExitCode *int
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
withExec(args: ["true"]) {
exitCode
}
}
}
}`, &res, nil)
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
require.NoError(t, err)
require.NotNil(t, res.Container.From.WithExec.ExitCode)
require.Equal(t, 0, *res.Container.From.WithExec.ExitCode)
/*
It's not currently possible to get a nonzero exit code back because
Buildkit raises an error.
We could perhaps have the shim mask the exit status and always exit 0, but
we would have to be careful not to let that happen in a big chained LLB
since it would prevent short-circuiting.
We could only do it when the user requests the exitCode, but then we would
actually need to run the command _again_ since we'd need some way to tell
the shim what to do.
Hmm...
err = testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
withExec(args: ["false"]) {
exitCode
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.From.WithExec.ExitCode, 1)
*/
}
func TestContainerExecStdoutStderr(t *testing.T) {
t.Parallel()
res := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Container struct {
From struct {
WithExec struct {
Stdout string
Stderr string
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
withExec(args: ["sh", "-c", "echo hello; echo goodbye >/dev/stderr"]) {
stdout
stderr
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.From.WithExec.Stdout, "hello\n")
require.Equal(t, res.Container.From.WithExec.Stderr, "goodbye\n")
}
func TestContainerExecStdin(t *testing.T) {
t.Parallel()
res := struct {
Container struct {
From struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
WithExec struct {
Stdout string
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
withExec(args: ["cat"], stdin: "hello") {
stdout
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.From.WithExec.Stdout, "hello")
}
func TestContainerExecRedirectStdoutStderr(t *testing.T) {
t.Parallel()
res := struct {
Container struct {
From struct {
WithExec struct {
Out, Err struct {
Contents string
}
}
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
}
}{}
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
withExec(
args: ["sh", "-c", "echo hello; echo goodbye >/dev/stderr"],
redirectStdout: "out",
redirectStderr: "err"
) {
out: file(path: "out") {
contents
}
err: file(path: "err") {
contents
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.From.WithExec.Out.Contents, "hello\n")
require.Equal(t, res.Container.From.WithExec.Err.Contents, "goodbye\n")
c, ctx := connect(t)
defer c.Close()
execWithMount := c.Container().From("alpine:3.16.2").
WithMountedDirectory("/mnt", c.Directory()).
WithExec([]string{"sh", "-c", "echo hello; echo goodbye >/dev/stderr"}, dagger.ContainerWithExecOpts{
RedirectStdout: "/mnt/out",
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
RedirectStderr: "/mnt/err",
})
stdout, err := execWithMount.File("/mnt/out").Contents(ctx)
require.NoError(t, err)
require.Equal(t, "hello\n", stdout)
stderr, err := execWithMount.File("/mnt/err").Contents(ctx)
require.NoError(t, err)
require.Equal(t, "goodbye\n", stderr)
err = testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
exec(
args: ["sh", "-c", "echo hello; echo goodbye >/dev/stderr"],
redirectStdout: "out",
redirectStderr: "err"
) {
stdout
stderr
}
}
}
}`, &res, nil)
require.Error(t, err)
require.Contains(t, err.Error(), "stdout: no such file or directory")
require.Contains(t, err.Error(), "stderr: no such file or directory")
}
func TestContainerNullStdoutStderr(t *testing.T) {
t.Parallel()
res := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Container struct {
From struct {
Stdout *string
Stderr *string
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
stdout
stderr
}
}
}`, &res, nil)
require.NoError(t, err)
require.Nil(t, res.Container.From.Stdout)
require.Nil(t, res.Container.From.Stderr)
}
func TestContainerExecWithWorkdir(t *testing.T) {
t.Parallel()
res := struct {
Container struct {
From struct {
WithWorkdir struct {
WithExec struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Stdout string
}
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
withWorkdir(path: "/usr") {
withExec(args: ["pwd"]) {
stdout
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.From.WithWorkdir.WithExec.Stdout, "/usr\n")
}
func TestContainerExecWithUser(t *testing.T) {
t.Parallel()
res := struct {
Container struct {
From struct {
User string
WithUser struct {
User string
WithExec struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Stdout string
}
}
}
}
}{}
t.Run("user name", func(t *testing.T) {
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
user
withUser(name: "daemon") {
user
withExec(args: ["whoami"]) {
stdout
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, "", res.Container.From.User)
require.Equal(t, "daemon", res.Container.From.WithUser.User)
require.Equal(t, "daemon\n", res.Container.From.WithUser.WithExec.Stdout)
})
t.Run("user and group name", func(t *testing.T) {
err := testutil.Query(
`{
container {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
from(address: "alpine:3.16.2") {
user
withUser(name: "daemon:floppy") {
user
withExec(args: ["sh", "-c", "whoami; groups"]) {
stdout
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, "", res.Container.From.User)
require.Equal(t, "daemon:floppy", res.Container.From.WithUser.User)
require.Equal(t, "daemon\nfloppy\n", res.Container.From.WithUser.WithExec.Stdout)
})
t.Run("user ID", func(t *testing.T) {
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
user
withUser(name: "2") {
user
withExec(args: ["whoami"]) {
stdout
}
}
}
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, "", res.Container.From.User)
require.Equal(t, "2", res.Container.From.WithUser.User)
require.Equal(t, "daemon\n", res.Container.From.WithUser.WithExec.Stdout)
})
t.Run("user and group ID", func(t *testing.T) {
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
user
withUser(name: "2:11") {
user
withExec(args: ["sh", "-c", "whoami; groups"]) {
stdout
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, "", res.Container.From.User)
require.Equal(t, "2:11", res.Container.From.WithUser.User)
require.Equal(t, "daemon\nfloppy\n", res.Container.From.WithUser.WithExec.Stdout)
})
}
func TestContainerExecWithEntrypoint(t *testing.T) {
t.Parallel()
res := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Container struct {
From struct {
Entrypoint []string
WithEntrypoint struct {
Entrypoint []string
WithExec struct {
Stdout string
}
WithEntrypoint struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Entrypoint []string
}
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
entrypoint
withEntrypoint(args: ["sh", "-c"]) {
entrypoint
withExec(args: ["echo $HOME"]) {
stdout
}
withEntrypoint(args: []) {
entrypoint
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Empty(t, res.Container.From.Entrypoint)
require.Equal(t, []string{"sh", "-c"}, res.Container.From.WithEntrypoint.Entrypoint)
require.Equal(t, "/root\n", res.Container.From.WithEntrypoint.WithExec.Stdout)
require.Empty(t, res.Container.From.WithEntrypoint.WithEntrypoint.Entrypoint)
}
func TestContainerWithDefaultArgs(t *testing.T) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
t.Parallel()
res := struct {
Container struct {
From struct {
Entrypoint []string
DefaultArgs []string
WithExec struct {
Stdout string
}
WithDefaultArgs struct {
Entrypoint []string
DefaultArgs []string
}
WithEntrypoint struct {
Entrypoint []string
DefaultArgs []string
WithExec struct {
Stdout string
}
WithDefaultArgs struct {
Entrypoint []string
DefaultArgs []string
WithExec struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Stdout string
}
}
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
entrypoint
defaultArgs
withDefaultArgs {
entrypoint
defaultArgs
}
withEntrypoint(args: ["sh", "-c"]) {
entrypoint
defaultArgs
withExec(args: ["echo $HOME"]) {
stdout
}
withDefaultArgs(args: ["id"]) {
entrypoint
defaultArgs
withExec(args: []) {
stdout
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
}
}
}
}
}`, &res, nil)
t.Run("default alpine (no entrypoint)", func(t *testing.T) {
require.NoError(t, err)
require.Empty(t, res.Container.From.Entrypoint)
require.Equal(t, []string{"/bin/sh"}, res.Container.From.DefaultArgs)
})
t.Run("with nil default args", func(t *testing.T) {
require.Empty(t, res.Container.From.WithDefaultArgs.Entrypoint)
require.Empty(t, res.Container.From.WithDefaultArgs.DefaultArgs)
})
t.Run("with entrypoint set", func(t *testing.T) {
require.Equal(t, []string{"sh", "-c"}, res.Container.From.WithEntrypoint.Entrypoint)
require.Equal(t, []string{"/bin/sh"}, res.Container.From.WithEntrypoint.DefaultArgs)
})
t.Run("with exec args", func(t *testing.T) {
require.Equal(t, "/root\n", res.Container.From.WithEntrypoint.WithExec.Stdout)
})
t.Run("with default args set", func(t *testing.T) {
require.Equal(t, []string{"sh", "-c"}, res.Container.From.WithEntrypoint.WithDefaultArgs.Entrypoint)
require.Equal(t, []string{"id"}, res.Container.From.WithEntrypoint.WithDefaultArgs.DefaultArgs)
require.Equal(t, "uid=0(root) gid=0(root) groups=0(root),1(bin),2(daemon),3(sys),4(adm),6(disk),10(wheel),11(floppy),20(dialout),26(tape),27(video)\n", res.Container.From.WithEntrypoint.WithDefaultArgs.WithExec.Stdout)
})
}
func TestContainerExecWithEnvVariable(t *testing.T) {
t.Parallel()
res := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Container struct {
From struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
WithEnvVariable struct {
WithExec struct {
Stdout string
}
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "alpine:3.16.2") {
withEnvVariable(name: "FOO", value: "bar") {
withExec(args: ["env"]) {
stdout
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Contains(t, res.Container.From.WithEnvVariable.WithExec.Stdout, "FOO=bar\n")
}
func TestContainerVariables(t *testing.T) {
t.Parallel()
res := struct {
Container struct {
From struct {
EnvVariables []schema.EnvVariable
WithExec struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Stdout string
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "golang:1.18.2-alpine") {
envVariables {
name
value
}
withExec(args: ["env"]) {
stdout
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, []schema.EnvVariable{
{Name: "PATH", Value: "/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},
{Name: "GOLANG_VERSION", Value: "1.18.2"},
{Name: "GOPATH", Value: "/go"},
}, res.Container.From.EnvVariables)
require.Contains(t, res.Container.From.WithExec.Stdout, "GOPATH=/go\n")
}
func TestContainerVariable(t *testing.T) {
t.Parallel()
res := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Container struct {
From struct {
EnvVariable *string
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "golang:1.18.2-alpine") {
envVariable(name: "GOLANG_VERSION")
}
}
}`, &res, nil)
require.NoError(t, err)
require.NotNil(t, res.Container.From.EnvVariable)
require.Equal(t, "1.18.2", *res.Container.From.EnvVariable)
err = testutil.Query(
`{
container {
from(address: "golang:1.18.2-alpine") {
envVariable(name: "UNKNOWN")
}
}
}`, &res, nil)
require.NoError(t, err)
require.Nil(t, res.Container.From.EnvVariable)
}
func TestContainerWithoutVariable(t *testing.T) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
t.Parallel()
res := struct {
Container struct {
From struct {
WithoutEnvVariable struct {
EnvVariables []schema.EnvVariable
WithExec struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Stdout string
}
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "golang:1.18.2-alpine") {
withoutEnvVariable(name: "GOLANG_VERSION") {
envVariables {
name
value
}
withExec(args: ["env"]) {
stdout
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.From.WithoutEnvVariable.EnvVariables, []schema.EnvVariable{
{Name: "PATH", Value: "/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},
{Name: "GOPATH", Value: "/go"},
})
require.NotContains(t, res.Container.From.WithoutEnvVariable.WithExec.Stdout, "GOLANG_VERSION")
}
func TestContainerEnvVariablesReplace(t *testing.T) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
t.Parallel()
res := struct {
Container struct {
From struct {
WithEnvVariable struct {
EnvVariables []schema.EnvVariable
WithExec struct {
Stdout string
}
}
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "golang:1.18.2-alpine") {
withEnvVariable(name: "GOPATH", value: "/gone") {
envVariables {
name
value
}
withExec(args: ["env"]) {
stdout
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.From.WithEnvVariable.EnvVariables, []schema.EnvVariable{
{Name: "PATH", Value: "/go/bin:/usr/local/go/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"},
{Name: "GOLANG_VERSION", Value: "1.18.2"},
{Name: "GOPATH", Value: "/gone"},
})
require.Contains(t, res.Container.From.WithEnvVariable.WithExec.Stdout, "GOPATH=/gone\n")
}
func TestContainerWorkdir(t *testing.T) {
t.Parallel()
res := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Container struct {
From struct {
Workdir string
WithExec struct {
Stdout string
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "golang:1.18.2-alpine") {
workdir
withExec(args: ["pwd"]) {
stdout
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.From.Workdir, "/go")
require.Equal(t, res.Container.From.WithExec.Stdout, "/go\n")
}
func TestContainerWithWorkdir(t *testing.T) {
t.Parallel()
res := struct {
Container struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
From struct {
WithWorkdir struct {
Workdir string
WithExec struct {
Stdout string
}
}
}
}
}{}
err := testutil.Query(
`{
container {
from(address: "golang:1.18.2-alpine") {
withWorkdir(path: "/usr") {
workdir
withExec(args: ["pwd"]) {
stdout
}
}
}
}
}`, &res, nil)
require.NoError(t, err)
require.Equal(t, res.Container.From.WithWorkdir.Workdir, "/usr")
require.Equal(t, res.Container.From.WithWorkdir.WithExec.Stdout, "/usr\n")
}
func TestContainerWithMountedDirectory(t *testing.T) {
t.Parallel()
dirRes := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Directory struct {
WithNewFile struct {
WithNewFile struct {
ID string
}
}
}
}{}
err := testutil.Query(
`{
directory {
withNewFile(path: "some-file", contents: "some-content") {
withNewFile(path: "some-dir/sub-file", contents: "sub-content") {
id
}
}
}
}`, &dirRes, nil)
require.NoError(t, err)
id := dirRes.Directory.WithNewFile.WithNewFile.ID
execRes := struct {
Container struct {
From struct {
WithMountedDirectory struct {
WithExec struct {
Stdout string
WithExec struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Stdout string
}
}
}
}
}
}{}
err = testutil.Query(
`query Test($id: DirectoryID!) {
container {
from(address: "alpine:3.16.2") {
withMountedDirectory(path: "/mnt", source: $id) {
withExec(args: ["cat", "/mnt/some-file"]) {
stdout
withExec(args: ["cat", "/mnt/some-dir/sub-file"]) {
stdout
}
}
}
}
}
}`, &execRes, &testutil.QueryOptions{Variables: map[string]any{
"id": id,
}})
require.NoError(t, err)
require.Equal(t, "some-content", execRes.Container.From.WithMountedDirectory.WithExec.Stdout)
require.Equal(t, "sub-content", execRes.Container.From.WithMountedDirectory.WithExec.WithExec.Stdout)
}
func TestContainerWithMountedDirectorySourcePath(t *testing.T) {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
t.Parallel()
dirRes := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Directory struct {
WithNewFile struct {
WithNewFile struct {
Directory struct {
ID string
}
}
}
}
}{}
err := testutil.Query(
`{
directory {
withNewFile(path: "some-file", contents: "some-content") {
withNewFile(path: "some-dir/sub-file", contents: "sub-content") {
directory(path: "some-dir") {
id
}
}
}
}
}`, &dirRes, nil)
require.NoError(t, err)
id := dirRes.Directory.WithNewFile.WithNewFile.Directory.ID
execRes := struct {
Container struct {
From struct {
WithMountedDirectory struct {
WithExec struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
WithExec struct {
Stdout string
}
}
}
}
}
}{}
err = testutil.Query(
`query Test($id: DirectoryID!) {
container {
from(address: "alpine:3.16.2") {
withMountedDirectory(path: "/mnt", source: $id) {
withExec(args: ["sh", "-c", "echo >> /mnt/sub-file; echo -n more-content >> /mnt/sub-file"]) {
withExec(args: ["cat", "/mnt/sub-file"]) {
stdout
}
}
}
}
}
}`, &execRes, &testutil.QueryOptions{Variables: map[string]any{
"id": id,
}})
require.NoError(t, err)
require.Equal(t, "sub-content\nmore-content", execRes.Container.From.WithMountedDirectory.WithExec.WithExec.Stdout)
}
func TestContainerWithMountedDirectoryPropagation(t *testing.T) {
t.Parallel()
dirRes := struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Directory struct {
WithNewFile struct {
ID core.DirectoryID
}
}
}{}
err := testutil.Query(
`{
directory {
withNewFile(path: "some-file", contents: "some-content") {
id
}
}
}`, &dirRes, nil)
require.NoError(t, err)
id := dirRes.Directory.WithNewFile.ID
execRes := struct {
Container struct {
From struct {
WithMountedDirectory struct {
WithExec struct {
Stdout string
WithExec struct {
WithExec struct {
Stdout string
WithMountedDirectory struct {
WithExec struct {
Stdout string
WithExec struct {
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
Stdout string
}
}
}
}
}
}
}
}
}
}{}
err = testutil.Query(
`query Test($id: DirectoryID!) {
container {
from(address: "alpine:3.16.2") {
withMountedDirectory(path: "/mnt", source: $id) {
withExec(args: ["cat", "/mnt/some-file"]) {
# original content
stdout
withExec(args: ["sh", "-c", "echo >> /mnt/some-file; echo -n more-content >> /mnt/some-file"]) {
withExec(args: ["cat", "/mnt/some-file"]) {
# modified content should propagate
stdout
withMountedDirectory(path: "/mnt", source: $id) {
withExec(args: ["cat", "/mnt/some-file"]) {
# should be back to the original content
stdout
withExec(args: ["cat", "/mnt/some-file"]) {
# original content override should propagate
|
closed
|
dagger/dagger
|
https://github.com/dagger/dagger
| 3,887 |
✨ Ability to add LABELs to Docker images published via SDK
|
### What are you trying to do?
Generate and publish a docker image which has LABELs.
Related discussion : https://discord.com/channels/707636530424053791/1042501877906022481
### Why is this important to you?
We have corporate policies that mandate certain labels on all docker images
### How are you currently working around this?
The workaround is to manually create a dockerfile with the LABELs added. But this is inconvenient and bypasses the features provided by the API and SDK
For broader set of OCI configs: #3886
|
https://github.com/dagger/dagger/issues/3887
|
https://github.com/dagger/dagger/pull/4387
|
c5c5e0e3a51b6a80eee69f07b24aec36ae99cc13
|
e24ce91f30cec5ad7f35f975c46f34969ad3bae3
| 2022-11-17T05:20:38Z |
go
| 2023-01-19T18:15:20Z |
core/integration/container_test.go
|
stdout
}
}
}
}
}
}
}
}
}
}`, &execRes, &testutil.QueryOptions{Variables: map[string]any{
"id": id,
}})
require.NoError(t, err)
require.Equal(t,
"some-content",
execRes.Container.From.WithMountedDirectory.WithExec.Stdout)
require.Equal(t,
"some-content\nmore-content",
execRes.Container.From.WithMountedDirectory.WithExec.WithExec.WithExec.Stdout)
require.Equal(t,
"some-content",
execRes.Container.From.WithMountedDirectory.WithExec.WithExec.WithExec.WithMountedDirectory.WithExec.Stdout)
require.Equal(t,
"some-content",
execRes.Container.From.WithMountedDirectory.WithExec.WithExec.WithExec.WithMountedDirectory.WithExec.WithExec.Stdout)
}
func TestContainerWithMountedFile(t *testing.T) {
t.Parallel()
dirRes := struct {
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.