Skip to content

Instantly share code, notes, and snippets.

@kpenfound
kpenfound / main.go
Last active February 14, 2023 17:12
reduced repro
package main
import (
"context"
"os"
"time"
"dagger.io/dagger"
)
@kpenfound
kpenfound / ci.go
Created February 10, 2023 21:56
Mage steps in dagger
package main
import (
"context"
"fmt"
"os"
"dagger.io/dagger"
)
@kpenfound
kpenfound / builder.go
Last active October 27, 2022 21:05
Dagger go builder function
// "Dockerfile" style layering
func goService(ctx context.Context, client *dagger.Client, servicePath string) (*dagger.Container, error) {
goMod, err := client.Host().Workdir().Read().File("go.mod").ID(ctx)
if err != nil {
return nil, err
}
goSum, err := client.Host().Workdir().Read().File("go.sum").ID(ctx)
if err != nil {
return nil, err
@kpenfound
kpenfound / getting-started.go
Created October 19, 2022 00:15
Dagger 0.3 Getting Started with Multiarch build
// ******************************************************
// Step 1. Create basic setup
// ******************************************************
// first setup go.mod with dagger and go mod edit etc
package main
import (
"context"
"fmt"
"os"
package main
import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/ioutil"
"log"
"net/http"
@kpenfound
kpenfound / keybase.md
Created June 30, 2016 18:10
Proof for keybase

Keybase proof

I hereby claim:

  • I am kpenfound on github.
  • I am kpenfound (https://keybase.io/kpenfound) on keybase.
  • I have a public key whose fingerprint is 4CA3 3D95 867A DC31 C15B EF3F 2955 3690 E950 D6D0

To claim this, I am signing this object: