#general

1 messages · Page 17 of 1

ionic plume
#

I don't really understand if there are a diff between to use directly docker.#Run and eventually chain them. And use docker.#Build with multiple step. I look on universe plugin, and some time it's docker.#Build that it used to run somethink, sometime is direct docker.#Run

wispy tapir
ionic plume
#

Ok, so under the wood is the same. docker.#Run not means it run container somewhere (docker run). All run in build

half wedge
#

tried setting the APP_NAME but still didn't help

#

everything is local on my Macbook

swift inlet
slender star
lilac thicket
half wedge
blazing horizon
#

Anyone using Dagger with Concourse CI and have an example pipeline they'd be willing to share?

slender star
#

Anyone using Dagger with Concourse CI

half wedge
#

Anyone encountered ERR failed to pull buildkit image....output=Error response from daemon: Get "https://registry-1.docker.io/v2/": tls: first record does not look like a TLS handshake. I have proxy set on my Docker Desktop.

empty jay
amber karma
#

Hi guys! I am a Software Engineer interested in the latest DevOps technologies and happy to contribute to this community!

winter linden
amber karma
#

Thanks @winter linden I will start playing with the project to learn more!

mystic mantle
#

registry TLS error

strange dagger
#

very new to dagger is there a way to include the Dockerfile by filename instead of by string contents (under https://docs.dagger.io/1205/container-images/#executing-a-dockerfile) or native CUE (https://docs.dagger.io/1205/container-images/#executing-a-dockerfile)? Want to test what Dockerfiles I already have without duplicating them in dagger files

You can use Dagger to build container images, either by executing a Dockerfile, or specifying the build steps natively in CUE. Which method to choose depends on the requirements of your project. You can mix and match builds from both methods in the same plan.

winter linden
loud stream
#

is it possible to run composite Service containers (e.g., up DB container before running test cases in case of DB dependency) with dagger

cosmic maple
# loud stream is it possible to run composite Service containers (e.g., up DB container before...

As far as I know there is not a built in mechanism to do that, what you could do is execute the command at the client level to start your DB by doing docker run or even docker-compose -d, example here -> https://docs.dagger.io/1203/client/#running-commands
Then just work with the container where want to run the test cases 🤔

dagger.#Plan has a client field that allows interaction with the local machine where the dagger command line client is run. You can:

rough galleon
#

I tried to find an answer in the online docs. Does anyone know if there is a parameter for parallelizing the dagger build?

sharp marsh
# rough galleon I tried to find an answer in the online docs. Does anyone know if there is a pa...

@rough galleon dagger automatically runs your actions in parallel depending on your input / outputs. For example, given the followin plan file:

dagger.#Plan & {
    actions: {
        _alpine: alpine.#Build & {
            packages: bash: _
        }

        // Hello world
        hello: {
            hello1: bash.#Run & {
                input: _alpine.output
                script: contents: "sleep 5"
                always: true
            }
            hello2: bash.#Run & {
                input: _alpine.output
                script: contents: "sleep 10"
                always: true
            }
        }
    }
}

the hello action will run both hello1 and hello2 in parallel

sharp marsh
# sharp marsh <@703340109159989418> dagger automatically runs your actions in parallel dependi...

consecutively, if you make the actions depend on each other like this: (note the input of hello2 is hello1.output)

dagger.#Plan & {
    actions: {
        _alpine: alpine.#Build & {
            packages: bash: _
        }

        // Hello world
        hello: {
            hello1: bash.#Run & {
                input: _alpine.output
                script: contents: "sleep 5"
                always: true
            }
            hello2: bash.#Run & {
                input: hello1.output
                script: contents: "sleep 10"
                always: true
            }
        }
    }
}

In this case, they'll run sequentially as they have dependent inputs/outputs

rough galleon
#

Great, thank you. For jobs with lots of dependencies, does it limit the number of parallel jobs to the number of cores, or does it start them all?

slender star
# rough galleon Great, thank you. For jobs with lots of dependencies, does it limit the number ...

@pseudo stream Can you speak to how buildkit would handle parallelization. Figure "it will use whatever is there, but it depends" is the short answer, but likely depends on factors like VM/phsyical machine config, container runtime config, Buildkit config, etc.
https://docs.docker.com/config/containers/resource_constraints/

Docker Documentation

Specify the runtime options for a container

pseudo stream
# slender star <@949034677610643507> Can you speak to how buildkit would handle parallelization...

@rough galleon By default there is no limit, but BuildKit has a mechanism to limit the amount of parallelization through its config file, search for max-parallelism here: https://github.com/moby/buildkit/blob/master/docs/buildkitd.toml.md

That config setting won't be set by the default Buildkit setup by Dagger, but if you setup your own buildkitd you can customize it: https://docs.dagger.io/1223/custom-buildkit/

faint sleet
#

Hi all, I'm running Dagger 0.28 and it looks like some of the "progress" has gone when running actions. Is there a new command line option I need to pass?

#

Effectively, I am running an action that takes about 30 minutes to complete, and the timer has stopped at 1.2s evening though the action is still busy?

#

...and, is it possible to get feedback, via different steps in an SSH section?

rain oriole
sharp marsh
sharp marsh
clever mesa
slender star
faint sleet
faint sleet
#

However, I've done a dagger project update but now some of my dagger do actions aren't working?

swift inlet
#

update breaking change

lilac thicket
#

Design for testability as a first-class concern

Hey all 👋 So I’m starting to mull over how “we” test shell scripts; and how we might use the CUE-abstraction-building-factory to help do that; and what Dagger can bring to the table in this space.

I’m really really interested in your thoughts in this area - particularly (but not exclusively!) about these 2 topics:

  • custom dagger modules (such as those in the universe and universe/x hierarchies) often ultimately reduce down to running some bundled shell script, in a dagger-orchestrated container; which isn’t a fantastic state of affairs, overall. Is this a temporary state of affairs, or something that folks have a plan to make significantly better? A public plan?? 🙂

  • we have, of course, “bats” as a unit/int testing tool. Is the dagger ecosystem actually a poor choice of place to thrash out an abstraction over the top of bats because — AFAICT — we’re a pretty “good” consumers of bats, being very boring and “just” using it as a shim into dagger, in the vast majority of cases?

echo palm
#

Anyone here using [neo]vim for Dagger/CUE work? Wouldn't mind seeing some example config and plugin use.

mystic mantle
#

It is quite limited as it is.
We're currently working on having some LSP available for CUE. So I guess, then you could use any good LSP plugin out there to have it natively in vim.
For now, I use vim, and I have the https://github.com/jjo/vim-cue plugin for CUE.
Somehow, the syntax highlighting doesn't automatically activate.
There is no code exploration (jump to definition, lists of reference). That would come with the LSP.

GitHub

cuelang/cue syntax highlighting plugin for vim, derived from google/vim-jsonnet - GitHub - jjo/vim-cue: cuelang/cue syntax highlighting plugin for vim, derived from google/vim-jsonnet

echo palm
thorn crest
safe storm
#

how to refer to environment variable $UID in cue file? trying to get this to work with rootless docker socket: For example, need to use this: client: network: "unix:///run/user/$UID/docker.sock": connect: dagger.#Socket

rain oriole
safe storm
#

hmm, now got this error: failed to load plan: expected selector, found "INTERPOLATION" ...

rain oriole
safe storm
#

02:09:38 dagger1 → dagger do build
failed to load plan: expected selector, found 'INTERPOLATION'
"unix:///run/user/(:
./testdocker.cue:32:31
expected '}', found 'EOF':
./testdocker.cue:35:3

// Example usage in a plan
dagger.#Plan & {
env: UID: string
client: filesystem: "./src": read: contents: dagger.#FS
client: network: "unix:///run/user/(env.UID)/docker.sock":
connect: dagger.#Socket

actions: build: #PythonBuild & {
    source: client.filesystem."./src".read.contents
}

actions: load: cli.#Load & {
    image: actions.build.output
    host:  client.network."unix:///run/user/\(env.UID)/docker.sock".connect
    tag:   "myimage"
}

}

rain oriole
safe storm
#

ok

rain oriole
#

env: UID needs to be inside client.

safe storm
#

makes sense! that helps with first one, but what about this one? host: client.network."unix:///run/user/(env.UID)/docker.sock".connect

rain oriole
safe storm
#

perfect, working now! Thanks!

safe storm
#

I guess I am still missing something: it is working with this in place client: { env: UID: string | *"1025" .... but it still failed with this in place: client: { env: UID: string .... in this case, it keeps saying "FTL failed to execute plan: task failed: client.env: environment variable "UID" not set. But I could do "echo $UID" and see my UID..

#

interesting, if using this client: { env: MYUID: string ..., then run it like this: MYUID=1025 dagger do build, it would work. so dagger by default won't read from user shell environment variables?

rain oriole
safe storm
#

UID is an environment variable set by bash. it would always be available for bash users. see: man bash | grep UID

rain oriole
#

Oh right, forgot about that.

#

Not all shell variables are exported.

#

This is one of those cases, it should be read-only, not exported.

#

What I do is: export PUID=$UID and then use that.

safe storm
#

makes perfect sense now! UID is a bash built-in variable, not exported. for rootless docker, there is another exported variable to use in this case. This is now working, no need to use UID: client: { env: XDG_RUNTIME_DIR: string ...
then do: ```
network: {
docker: {
address: "unix://(env.XDG_RUNTIME_DIR)/docker.sock"

rain oriole
#

Awesome, even better 🙂

scenic gale
#

just curious... are there any codegen scripts for compdef so that I could add auto-completions for a given project's "dagger do" actions?

#

and if not... I guess it feels like a fun idea to add either some core scripts or some libs for letting folks quickly add the action.

wraith niche
winter linden
#

dagger do —help works too. Yes auto-completion would be 🤯

fast python
#

G'day, everyone. I just discovered dagger today, but it already sounds very similar to a proprietary/non-public project of mine of a smaller scope. Reproducible multi-step deployment pipelines, able to run against multiple environments, passing inputs/outputs around, etc. Python, scripts, terraform, secret management, and "CI/CD favourite of the day" integration. I'll say something more interesting after I dig around a bit. ;-)

tribal sedge
slender star
tribal sedge
slender star
#

I think if you click the icon, you'll get an invite to this Discord server and won't have the problem anymore.

tribal sedge
echo palm
#

When I have lint errors locally, when running dagger do lint can I silence all the lines that look like this?

#25 0.224       deleted:    website/static/img/use-cases/build-action.png                                                   
#25 0.224       deleted:    website/static/img/use-cases/client-api.png                                                     
#25 0.224       deleted:    website/static/img/use-cases/particubes-actions.png                                             
#25 0.224       deleted:    website/static/img/use-cases/particubes.com.png                                                 
#25 0.224       deleted:    website/static/img/what-is-dagger.png                                                           
#25 0.224       deleted:    website/yarn.lock                                ```
#

This is the head of the log in plain format:

6:54PM INF actions.lint.cue._dag."4"._exec | #24 0.107 Your branch is up to date with 'origin/1password'.
6:54PM INF actions.lint.cue._dag."4"._exec | #24 0.107
6:54PM INF actions.lint.cue._dag."4"._exec | #24 0.107 Changes not staged for commit:
6:54PM INF actions.lint.cue._dag."4"._exec | #24 0.107   (use "git add/rm <file>..." to update what will be committed)
6:54PM INF actions.lint.cue._dag."4"._exec | #24 0.107   (use "git restore <file>..." to discard changes in working directory)
6:54PM INF actions.lint.cue._dag."4"._exec | #24 0.107  deleted:    .github/dependabot.yml
6:54PM INF actions.lint.cue._dag."4"._exec | #24 0.107  deleted:    .github/workflows/add-issues-to-backlog.yml
swift barn
turbid tulip
swift barn
#

As this image suggests, if anyone has written actions in javascript then please share, thanks

winter linden
grave topaz
fast python
#

Still reading through the docs, but perhaps someone can answer. Is it possible to a generic list of actions? Use-case: China and the Great Firewall (aka constant network interruptions). Secondary use case: Security, avoiding dependency injections.

wispy tapir
fast python
# wispy tapir See https://docs.dagger.io/1221/action for complete explanation

Terminology, sorry. Q: Is there anything that is downloaded from the Internet at "dagger do" time? eg. Docker images, plugins, etc.

If so, is there a way to easily parameterized the locations, eg. To download from a mirror, or pre-bake these dependencies. In the China use-case, we want to develop in Rest-Of-World, then have the same code also work in China, where github, docker registries, etc. are slow and unreliable.

At my org, we mirror some repos with deployment scripts to China, but have separate configuration repos. For terraform, we build a docker image with all the relevant providers, and mirror that to our docker registry in China.

We try very hard to avoid any network dependencies outside of China, because of the Great Firewall that always leads to Great Frustration.

swift barn
rain oriole
wispy tapir
grave topaz
fast python
#

Yeah, I've been thinking about a proxy there. Either caching with eventually-cached. Or we also have a private line, so could theoretically bypass the Firewall.. but the latter opens up security Qs that we'd rather not have. The simpler, the better.

wispy tapir
swift inlet
grave topaz
fast python
#

OK. If we can parameterize the docker registry/imageURL easily, then we can make it work without proxies, too. Our mirroring has extensive retries... ;-)

swift inlet
timber sphinx
#

I'm running Mage (go based Make alternative) for a lot of automation steps in my pipelines.
Is there a simple example of invoking a binary like Mage instead of wrapping in bash scripts so I could play around with this?

Ie mage pulumi:preview app dev currently is invoked via bash. If I have mage go binary already installed though, can I just invoke mage?

winter linden
#

So your dagger action must specify 1) how to get mage installed in a container image, 2) how to run mage in that container

swift barn
simple gull
#

hi, is there a way to test a http endpoint and if it fails, fail the action?

simple gull
#

also: is there a way to pass arguments to dagger cli that can be used within the cue file?

slender star
#

gitops

winter linden
fervent pumice
#

hi all! 👋

#

I'd love to start a discussion around MLOps and similar execution engines (Argo, Airflow, Kubeflow, etc) - anyone interested? Or is there a place to talk about this?

chilly arch
#

By posting there, it will allow everyone in any timezone to contribute to the conversation. Thanks in advance for posting!

slender star
winter linden
#

@karmic sand I worked on your spectral action today 🙂

karmic sand
#

oh nice

silk apex
nova thicket
boreal tide
#

Hi, I’m trying to follow on the best practices as mentioned in the docs. Is there a cli help for explaining an action? I.e., field docs? The help for action doesn’t display it

boreal tide
winter linden
candid gyro
#

Is there any Dagger/CUE way to pin dependencies to a particular version right now?

swift inlet
candid gyro
swift inlet
#

Perfect: you can retrieve that version with dagger project update url@tag. The tag would represent the version you tagged on your external repo

swift inlet
silk apex
slender star
#

--with

wraith niche
#

Hello, if anyone is open to give feedback after trying Dagger (good or bad!), or have difficulty using it, or just want to discuss about CICD challenges, here is link to schedule time to chat live: https://savvycal.com/samalba/fe5156ba

halcyon island
# wraith niche Hello, if anyone is open to give feedback after trying Dagger (good or bad!), or...

I just went thru a build tool evaluation between Dagger, Earthly, Make+BuildKit. We ended up picking Earthly. The main thing that disqualified Dagger for us was that there was no easy way to start services or run interactive command from within Dagger (at least I didn't find one). Other things that worked against Dagger was the steep learning curve (need to learn cue), the documentation can sometime difficult to follow (thing started to make more sense when I started to read the cue code in dagger.io package). The main advantage of Dagger is that it's highly composable which make it easy to write reusable components. Depending on how Dagger and Earthly evolve we might re-evaluate our choice. If you are interested in more details, let me know I can schedule a chat.

wraith niche
hoary spoke
#

I think dagger autorelease is failed, is it possible to restart ?

swift inlet
boreal tide
#

I have this in the cue file

strings.Replace(strings.toLower(client.env.NAME), " ", "-", -1)

and for some reasons, I get the following error.
cannot call non-function strings.toLower (type _|_):

the name comes from the environment and I want to sanatize before I can use itg

swift inlet
#

or with a string interpolation:

foo: "\(client.env.NAME)"
strings.Replace(strings.toLower(foo), " ", "-", -1)
boreal tide
swift inlet
boreal tide
swift inlet
swift inlet
boreal tide
sharp marsh
sharp marsh
slender star
#

@karmic sand ☝️ brew upgrade dagger 💯

chilly arch
# boreal tide yup. The cue-lang isn't as straight forward as I'd imagine.

› I just posted a discussion around CUE and making it easier to understand for our community. If you have suggestions on how we can improve our documentation for CUE, please add it here: https://github.com/dagger/dagger/discussions/2473 Thanks in advance!

GitHub

Hi Dagger Community! We want to make the onramp to CUE easier for the community, so I'd like to collect feedback on exactly where you might be getting stuck. Currently, we point the communi...

boreal tide
#

What tool do you folks use to format cue files? its been really an issue formatting the cue files

boreal tide
chilly arch
# boreal tide Thank you, this helped

Great to hear. We are working on improving our CUE docs, so any input from the community and yourself will help us know exactly which topics to start with.

boreal tide
#

For some strange reason - dagger does not recognise an action. Is there a reason is this could happen?

boreal tide
#

is there a way to throw an error - if a field is missing? I have a case where I have two fields, only one of the fields is optional. How do I enforce it?

I don't have a fallback where both are missing

swift inlet
swift inlet
boreal tide
swift inlet
boreal tide
swift inlet
boreal tide
#

field3 is mandatory

winter linden
#
{
  field1: string
  foo: field1
} | {
  field2: string
  foo: field2
}

@boreal tide @swift inlet

boreal tide
#

I think I saw this notation. so how would I use it?
I have something like this

#method: {
    field1: *null | string
    field2: *null | string
    field3: string
    // more 4 fields
    _somemethod: lib.#method1 & {
        // more stuff here
    }
}
winter linden
arctic edge
#

Hi from London, just like to try out and see if there are minimal hello world CI/CD examples to fully understand this before planning to migrate existing CI/CD pipeline to here. This CI/CD is managing a dockerized Django app with MongoDB backend. Currently using Devtron so anyone who also used that too would like to share your experience is appreciated.

winter linden
# arctic edge Hi from London, just like to try out and see if there are minimal hello world CI...

Hello! There are a few example configurations, but you can check out this "todoapp" sample app with build, test, deploy automated using Dagger: https://github.com/dagger/todoapp

GitHub

A sample React app which you can build, test and deploy with Dagger - GitHub - dagger/todoapp: A sample React app which you can build, test and deploy with Dagger

arctic edge
#

Why are there:

dagger do build
dagger do deploy
dagger do test etc

why not just
dagger build
dagger deploy
etc

winter linden
#

build, deploy, test are not actions defined by dagger. They are defined by you, in your Dagger project. So they can be anything you want

#

Project-defined actions are scoped in dagger do, to avoid conflicting with dagger's own built-in commands

arctic edge
#

I see

winter linden
#

There is a proposal to combine everything in the top-level, as you describe, but we don't have consensus on it at the moment, because of the naming conflict. In doubt, it's safer to not cross that one-way door

arctic edge
#

It compliments other CI tools? Currently using Devtron CI/CD so not sure if they are doing the same thing, migrate to here and use both together.

winter linden
#

Yes it complements them. Typically you would 1) automate an action or workflow using Dagger, 2) run it locally during development, 3) run it in your existing CI environment.

#

Assuming Devtron CI/CD has a way to run docker containers, then it's almost certainly possible to run Dagger actions as part of your Devtron setup

arctic edge
#

After cloning todoapp

winter linden
#

@arctic edge I might have just broken that... 😅 sorry.

#

@arctic edge would you mind running git pull and trying again?

#

By coincidence we just migrated this todoapp today

arctic edge
#

Didn't seemed to work

#

open build/index.html

showing a blank page

winter linden
#

@arctic edge could you remove cue.mod/dagger.* ?

#

note: all dependencies are vendored in that app so you don't actually need to update dependencies to run (as you discovered).

arctic edge
#

delete:
dagger.mod
dagger.sum

only?

winter linden
#

yes, that should fix dagger project update

#

(I also pushed that fix to the repo just now, plus an update of all dependencies, so feel free to pull that too if you want)

#

sorry about that

arctic edge
#

git pull
dagger do build
open build/index.html

still a blank todoapp page? Chrome

#

file:///$HOME/Documents/dagger/todoapp/build/index.html in chrome is showing blank page?

#

main branch correct in this todoapp?

winter linden
#

yes, main branch is correct. Probably another problem introduced today... Weird I tried dagger do deploy just earlier and it worked fine online (hosted on netlify)

arctic edge
#

in main branch

#

dagger 0.2.12 (21a15a84) darwin/amd64

#

public/index.html also blank page

winter linden
#

Weird, dagger itself seems to run just fine, yarn build seems fine too

arctic edge
#

yarn version v1.22.10
info Current version: 0.1.0

winter linden
#

the contents of public/index.html looks like a regular horribly obsfucated html/js file...

#

@arctic edge do you have a netlify account, to try dagger do deploy?

arctic edge
#

not yet, sorry did we have to yarn install first

winter linden
#

no, dagger runs everything in containers, so you don't need to install anything on your client machine

arctic edge
#

docker is running in the background

#

do we need to set context

winter linden
#

@arctic edge we have found the issue, it's a tweak of the JS app itself, we'll fix it right away

winter linden
#

you can also override that by setting BUILDKIT_HOST directly (for example to connect to a remote buildkit runner)

arctic edge
#

so instead of pushing to git repo and then start the Devtron CI/CD pipeline on AKS, dagger can tell locally if things are ok when dagger do build? This is for case of say dockerized django app for example

winter linden
#

Yes

#

But usually you still keep your CI/CD steps - dagger helps you run more builds & tests locally, in addition to CI/CD

#

And it helps you streamline configuration between local automation and CI automation - you can write it once for Dagger, and run it in both environments

winter linden
#

@arctic edge if you pull the latest version of todoapp, the "blank page" should be fixed

#

courtesy of @wraith niche

arctic edge
#

Thanks works, BTW is this similar to garden.io

winter linden
# arctic edge Thanks works, BTW is this similar to garden.io

Some of the use cases appear to be the same (deploy environments on-demand; better automation of integration tests). But there are differences too.

One major difference is that Garden seems to only run on Kubernetes, and advocates for no more local execution of pipelines. By contrast, Dagger can run anywhere (local, kubernetes, CI) and supports both local and remote execution.

arctic edge
#

local will always be great

boreal tide
rain oriole
candid gyro
#

So I know that it's been decided that any kind of DAG visualization is out of scope for Dagger currently. However, I'd like to know how possible writing something like that currently is ? Is there any way to externally observe a dagger execution ? I assume stdout is not enough to properly express dependencies and such ?

swift inlet
#

DAG Visualizer

smoky shard
#

Heya are there any good examples of embedding dagger within a go program rather than running it from the cli?

winter linden
#

(also if you really want to do it, you can, but if you can use dagger in such a way that you don’t have to do this, you will probably avoid headaches)

smoky shard
# winter linden Not at the moment, we don’t have a go API and don’t recommend doing this at the ...

Thanks for the quick reply @winter linden!

We currently have a golang Github App that watches repos and builds docker images using Kaniko in Kubernetes. I would like to replace Kaniko with buildkit, and was thinking, what if the app were integrated with Dagger. We could then use Dagger to not only build containers but run pre-defined linters and tests as well.

For this use case would you recommend something like exec.Command to run dagger instead?

winter linden
random hearth
#

hey there 👋 ,

just saying hi and starting to play around with dagger

#

Would it be beneficial to have a GitHub issue or a page somewhere which shows who is using dagger and links to their examples?

random hearth
#

Also i guess this is mee being a noob with cue. But are you looking at its usability aspect and current DX? I know its not exactly the problem of dagger but as its the main interface i guess its also important for you?

Like lack of "properly maintained" ide support, language server, etc...

i see your pushing on the package management of cue aswell (https://github.com/cue-lang/cue/issues/851#issuecomment-1119501797)

winter linden
random hearth
#

i feel like it would be quite a "blocker" for getting any kind of major adoption right now you will end up with a few people knowing the system inside out and then anyone who doesn't have an IDE holding their hand will put their hands up and say "i dont know what this is and i dont know how to write it im not touching my CI config"

which is a shame because so far im really enjoying it

winter linden
#

Yes I agree 100%, and glad you are enjoying it 🙂 There are also DX improvements we can make that are specific to Dagger. Hopefully you will enjoy it even more in a few months!

random hearth
silk snow
#

Do you guys by any chance have some presentation that I could use?

boreal tide
random hearth
#

I think i have what i need working, at least enough to present to other people on my team. But yea my main concerns are the same as yours tkcb.

We are currently migrating to github actions (away from drone). So ideally would be the perfect time to consider dagger but im not super sure its ready right now (for those DX reasons).

#

Im gonna give it a damn good go though 😹

winter linden
#

Very helpful feedback thank you, and it validates our current priorities which is encouraging 🙂

  • Vscode extension (and language server) is under development by @swift inlet and @wispy tapir

  • fmt and more generally exposing cue tooling directly in dagger: makes sense, it is on the list but we could move up in priority , what other commands did you have in mind?

  • docs improvements, more examples -> +1000 we are actively working on that (and always have extra work if anyone wants to make a contribution 🙂

swift inlet
winter linden
#

Also something to consider @random hearth : you can use dagger for one action inside your drone/gha workflow, then gradually use it more over time. One way to hedge adoption risk & smooth out the learning curve

random hearth
#

yea ill probally be back in here next week asking some more questions once i discussed it with the team>

Do you have any kind of public roadmap with the higest priority things your working on?

winter linden
#

Soon 🙂 For now you can look at assigned issues

#

We’ll add more in the next couple weeks

boreal tide
winter linden
silk snow
# winter linden I’m sure we can arrange that 😁 Can you email <@933501536624054272> at jeremy@da...

Nah, don't wanna waste his time.

In my company we have weekly presentations about cool projects, and it is my turn on Monday, so I thought someone may already have presentation about this project, nvm.

edit:
I think I've found solution to my problems, you guys already have docs in markdown 😄
https://gist.github.com/johnloy/27dd124ad40e210e91c70dd1c24ac8c8

Gist

List of markdown presentation tools. GitHub Gist: instantly share code, notes, and snippets.

slender star
balmy orbit
#

so... quick question, when i use docker.#Run to launch a container from an image i just built and i use a mount... it seems to copy the content into the mount location rather than do an actual mount (ie whatever changes i make in the mounted fs inside the container are not persisted) ... is there away to have a real mount?

winter linden
winter linden
balmy orbit
#

it's my first day with daggio.io so i'm learning as quickly as i can 😉 (and i have no experience with cue syntax)

#

what i'm planning on doing, is using the image i just built (with makeBuilder) to build all of the wheels for my python project

#

but if the mount isn't working as i expect... then the generated wheels won't be present unless i copy them back out of the container which i'd like to avoid

winter linden
#

The mounts in docker.#Run are different, they use buildkit mounts which are the same tech that make mounts available in a dockerfile. So it’s one-way (the source of the mount is not modified)

slender star
#

python wheels

boreal tide
#

I think I have mentioned before with the latest version I get error everytime I update my library.

dagger project update -u          
8:54AM INF system | updating all installed packages...
8:54AM ERR system | error installing/updating packages: repo doesn't have any tags matching the required version
dagger project update             
9:00AM INF system | installing all packages...
9:00AM ERR system | error installing/updating packages: github.com/xxxx/mylib@0.0.1: checksum didn't match

contents of dagger.mod

github.com/xxxx/mylib 0.0.1

contents of dagger.sum

github.com/xxxx/mylib h1:LoLXEl81GRmsO4NYQ7Rmr3aktV43KPtbhl7qTj3N5sQ=

This issue started with 0.2.10 release I believe, I'm currently on 0.2.12

to be clear: this works the first time when you are adding the packages. When you try to update it again - it fails

balmy orbit
#

some repository of tons and tons of snippets for doing everything from the mundane to perhaps more complicated would be highly useful

wraith niche
#

some repository of tons and tons of

loud stream
#

Hi, In what scenario dagger can be used to support or speed up development processes where other CI/CD like Jenkins are already in-place for developers. do anyone had insight on that.
@winter linden

winter linden
#

Sure. Dagger can help in 4 ways:

  1. same automation available in dev and CI. Instead of maintaining separate scripts. So your cicd pipeline can start before committing and pushing the code

  2. less CI lockin. Run the same Dagger actions on top of jenkins or another CI, without rewriting everything

  3. easier to test & debug your cicd pipelines locally

  4. it’s easier to create more advanced cicd workflows , for example live e2e testing, on-demand staging environments etc

#

Also 4) it’s easier to create more advanced cicd workflows , for example live e2e testing, on-demand staging environments etc

frozen spindle
#

#3 is really the big one for me. I can't tell you how many "fixing jenkins" commits I have in my stupid repos because I thought, "This change will just be a quick little fix, no need to create a branch where I can squash all my commits" 🤦‍♂️

frozen spindle
#

Also just started using dagger for docker builds. It's a pretty standard need for every company. You need some list of in house base images, often just using standard base images in docker hub, but they need some small tweak. like adding a corporate self signed cert authority to the ca list. I used it to add the cert authority once to a single folder. then copy that file in with a definition to every image we are building. It also comes with a built in build narrower. If I just want to build all images, I just run dagger do build if I want to build one set of base images I just do dagger do build my-base-image I can even narrow it to a single tag! And it all just comes for free with the way you write dagger builds. I'm very in love with it.

rigid epoch
chilly arch
rigid epoch
boreal tide
#

how do you properly python dependencies? is there an example somwhere I can lookup

swift inlet
swift inlet
#

I would use: python.#Image (https://github.com/dagger/dagger/tree/bbfddcbe82f8b19c76af7a3f413e613098ff6c68/pkg/universe.dagger.io/python) as a step in a docker.#Build, and do a pip install in a following step: https://github.com/dagger/dagger/blob/bbfddcbe82f8b19c76af7a3f413e613098ff6c68/pkg/universe.dagger.io/docker/test/build.cue#L14-L28 => You just replace alpine.#Build by python.#Image and in the docker.#Run step, you run the pip install.
This new image would become your base python image that has all the dependencies installed

hollow terrace
#

I am building a (sort of) meta-framework using dagger focusing on developing AI-based solutions (like next is for react). Just got done with the feature of building development containers (going to add actions for labeling, creating web APIs based on a model, generating docs, etc in the future) and I am open-sourcing it.

https://github.com/machinelearning-one/aim

GitHub

A portable devkit for building AI based solutions. Contribute to machinelearning-one/aim development by creating an account on GitHub.

#

Thank you dagger team for being so helpful

swift barn
#

I created a main.cue and imported the github.com/mlkmhd/dagger-maven project in it, but it does not resolve my dependency when I run dagger project update command:

main.cue:

package main

import (
"dagger.io/dagger"
"dagger.io/dagger/core"
"github.com/mlkmhd/dagger-maven"
)

dagger.#Plan & {
...
I run this command:
$ dagger project update

but it does not resolve imported dependency and my tree is like this:
$ tree -L 3

.
├── cue.mod
│ ├── module.cue
│ ├── pkg
│ │ ├── dagger.io
│ │ └── universe.dagger.io
│ └── usr
└── main.cue
Am I doing something wrong?

stoic forge
#

What is a the stage?

winter linden
young stag
#

Is migrating from GitLab to Dagger - in terms of CI/CD - a performance plus and or any other benefit?

winter linden
# young stag Is migrating from GitLab to Dagger - in terms of CI/CD - a performance plus and ...

Technically you would be migrating from Gitlab to "Dagger on Gitlab" 🙂

Yes there can be indirect performance benefits, for example with automatic caching and more granular actions. But it depends on your configuration, it's not always guaranteed to be faster. The main benefits are 1) Parity between CI and dev 2) portability between CIs, 3) local testing/debugging of your CICD setup, 4) easier to create more powerful workflows

fossil pine
#

Here is something I've been thinking about lately: in our organization (Cisco ET&I) we have a central Jenkins pipeline that most of our teams use.

The benefit of having a central pipeline is we can make sure everyone goes through the same compliance checks, every team submits the necessary reports before releasing a new version, etc. Another benefit is that new teams can start with a ready made CI pipeline easily.

The pipeline is more or less customizable/composable, but the high level steps are dictated by the pipeline.

Dagger would be an interesting addition to this setup, because it would allow way more customization for the development teams which is often desirable, but at the same time would take away some of the control from the team owning the pipeline itself.

So in order for us to integrate Dagger, we would need some sort of validation that the pipeline includes the required steps.

We could obviously run a hybrid pipeline where Dagger is just a part of the whole thing, but it would be nice to move the central pieces to Dagger as well (for the same reason why anyone would use Dagger: build and test locally).

Bottom line: it would be interesting to see how we can validate that a certain plan would complete certain actions (eg. defined in a central repository). One possible solution is evaluating the plan with Cue and doing some sort of validation (or using Cue itself to validate the Dagger plan).

What do you think?

Is this going to be a real issue? Does Dagger have an (unintentional?) decentralization effect?

slender star
#

Org Compliance of Dagger plans on Jenkins

chilly arch
#

Hey Dagger Community! We just created a tool that gives you the ability to centralize telemetry from your engines and visualize it, which will help you debug faster! Follow our guide here on how to access it: https://docs.dagger.io/1241/dagger-cloud If are still struggling with your run, we have provided an easy way for you to request help from our team through the Dagger Cloud UI too. You can follow the instructions below to learn how to submit your request through the UI: https://docs.dagger.io/1241/dagger-cloud#how-to-submit-a-help-request Note: We'd love feedback, so please reach out to me directly with any feedback that you have on the tool!

swift barn
#

Hey Dagger Community We just created a

fossil pine
#

I wrote a blog post about how Dagger transformed my perspective on development environments: https://twitter.com/sagikazarmark/status/1536122881326866432

https://sagikazarmark.hu/blog/the-perfect-development-environment-2022/

Blogged about my latest thoughts about developer experience and development environments.

https://t.co/zdbTXbhEst

mystic mantle
halcyon island
#

FYI I opened an issue with VsCode dev-container to make it easier to work with dagger. I mentioned earthly, but should make it easier for dagger too. If you are interested you can go upvote https://github.com/microsoft/vscode-remote-release/issues/6811

GitHub

We have project were we use earthly instead of Dockerfile to build our container image. We are still able to use devcontainer by pre-building the image and referencing the built image. However it w...

slender star
chilly arch
#

Hi Dagger Community! We did a first alpha release of Dagger Cloud last week. The tool gives you the ability to centralize telemetry from your engines and visualize it, which will help you debug faster. Dagger Cloud Docs: [https://docs.dagger.io/1241/dagger-cloud]

Thank you to everyone who has taken the time to try it out and provide feedback. If you have already tried the tool, but haven’t been able to provide feedback, we’d appreciate if you could give us some feedback here: [https://blocklayer.typeform.com/to/wuQLS5Gz]

If you haven’t tried it yet and want to learn more, I’d be happy to walk you through a live demo with myself and one of our engineers. We are looking to meet with users who haven’t had a chance to try it out, so we can gather live feedback on your experience with the UI. If this is interesting to you, please contact me and we can get something scheduled. I look forward to meeting you!

wraith niche
#

Posting here as I am sure it'll help a lot of people: a new guide is live for the docker package. It covers in details everything you need to know for building Docker images: https://docs.dagger.io/1241/docker - credits to @rain oriole who contributed this page.

The universe.dagger.io module is meant to provide higher level abstractions on top of core actions. Of these, the universe.dagger.io/docker package provides a general base for building and running docker images.

hollow terrace
hexed valve
#

Hey, how do I run dagger actions locally, with the output of commands being streamed to the terminal? In gh actions they show up by default, but not using dagger locally...

winter linden
hexed valve
#

Will try, thanks!

winter linden
#

Note that because of caching, there's no guarantee that the command will be executed each time. That's a good thing, since it will make execution faster. But it also means you won't see the output of every command streamed every time.

fossil pine
#

Here is another post about Dagger:

https://dev.to/sagikazarmark/building-a-ci-pipeline-for-a-go-library-with-dagger-2an7

https://twitter.com/sagikazarmark/status/1539384940856475648

This time it's about building a pipeline for a Go library.

You can find the complete example here: https://github.com/sagikazarmark/dagger-go-library

Let me know what you think!

DEV Community

Originally published at https://sagikazarmark.hu. I've been playing with Dagger for months now...

Blogged about building a CI pipeline for a @golang library with @dagger_io

https://t.co/yAgWDf1aoH

The complete example is available here: https://t.co/h2YydAMXFn

GitHub

Go library example for Dagger. Contribute to sagikazarmark/dagger-go-library development by creating an account on GitHub.

frozen spindle
#

Has anyone successfully created a jenkins shared library that calls a dagger task? I'm not sure I want to push dagger onto all the devs just yet, but I am getting pretty freaking tired of git, commit, pushing my shared library files only to find out I missed a comma after 5 minutes of running some other build. I would really love a way to expose a shared library as a groovy function, but just have it call a dagger command on the backend.

slender star
# frozen spindle Has anyone successfully created a jenkins shared library that calls a dagger tas...

Hi @frozen spindle 👋 I haven't heard of anyone doing that yet, but it does sound like you'd not be alone in using something like that. How simple could it be and still be useful? Would you package the Dagger CUE files in the Jenkins resource files? Looks like it could be pretty easy to get a proof of concept going 🙂
https://www.jenkins.io/doc/book/pipeline/shared-libraries/#writing-libraries

Extending with Shared Libraries

Jenkins – an open source automation server which enables developers around the world to reliably build, test, and deploy their software

frozen spindle
#

Yeah so I jumped down that rabbit hole a bit today. And the main issue is that the libraryResource function returns the content of the file instead of the path 🤦 . Maybe there's another way of getting the resources directory that I'm not aware of? If I could do that I'm guessing I could do dagger do --plan=resources/com/company/dagger/dagger.cue or something

#

Extending with Shared Libraries

winter linden
clever mesa
#

GoRepleaser like configuration showcase: (#Push is incompatible)
https://github.com/octohelm/cuemod/blob/main/dagger.cue#L37-L87

actions: go: golang.#Project & {
    source: {
        path: "."
        include: [
            "cmd/",
            "pkg/",
            "go.mod",
            "go.sum",
        ]
    }

    version:  "\(actions.version.output)"
    revision: "\(client.env.GIT_SHA)"

    goos: ["linux", "darwin"]
    goarch: ["amd64", "arm64"]
    main: "./cmd/cuem"
    ldflags: [
        "-s -w",
        "-X \(go.module)/pkg/version.Version=\(go.version)",
        "-X \(go.module)/pkg/version.Revision=\(go.revision)",
    ]

    env: {
        GOPROXY:   client.env.GOPROXY
        GOPRIVATE: client.env.GOPRIVATE
        GOSUMDB:   client.env.GOSUMDB
    }

    build: {
        pre: [
            "go mod download",
        ]
    }

    auths: "ghcr.io": {
        username: client.env.GH_USERNAME
        secret:   client.env.GH_PASSWORD
    }

    mirror: {
        linux: client.env.LINUX_MIRROR
    }

    ship: {
        name: "\(strings.Replace(go.module, "github.com/", "ghcr.io/", -1))/\(go.binary)"
        from: "gcr.io/distroless/static-debian11:debug"
    }
}

client: filesystem: "build/output": write: contents: actions.go.archive.output
Available Actions:
  version                
  go                     
  go source              
  go ship                
  go ship pushx          Push all images as multi-arch images
  go ship push           
  go ship push x         Merge pushed arch suffix images into mutli-arch image
  go ship push amd64     Push <arch> suffix image
  go ship push arm64     Push <arch> suffix image
  go build               Go build binary for special platform
  go build linux/amd64   
  go build linux/arm64   
  go build darwin/amd64  
  go build darwin/arm64  
  go archive             Archive all built binaries into local (need to define client: `filesytem: "x": write: contents: actions.go.archive.output`)
balmy orbit
#

i don't suppose there's any docs that describe how the dagger package/module loader works? how it finds modules, installs them, etc

slender star
balmy orbit
balmy orbit
# slender star does this help? https://docs.dagger.io/1238/project-file-organization

i'm also thinking of versioned namespaces as well... like i know i can reference tags via @ and what not, but i kind of feel like this large reusable set of actions i'm building out atm will ultimately be thrown out in favour of a huge set of v2 versions that are structured very differently since i look back at some of them already and cringe lol

slender star
balmy orbit
#

interesting

balmy orbit
#

or is it simply manual copying and whatnot (i'm currently using a symlink so i can work on the actions in combination)

slender star
#

I've done copying and symlinking too.

balmy orbit
slender star
balmy orbit
#

among other things... the first thing is the fact that locally i wrap dagger funcitonailty with Makefile since that's what our team is familiar wiht (basically using make like you'd use github actions) ... and i was thinking of having Makefile run docker on a dagger image to invoke dagger so that dagger didn't have to be manually installed

clever mesa
# balmy orbit among other things... the first thing is the fact that locally i wrap dagger fun...

I think you could put dagger binary in docker:dind, and run with docker.sock mounts.

Or like me use the the remote buildkit instead. no need docker required.

# .gitlab-ci.yaml
# gitlab runner in k8s cluster
stages:
  - ship
ship:
  stage: ship
  # image use my custom build https://github.com/octohelm/dagger/pkgs/container/dagger 
  image: ${DAGGER_BUILDER} 
  script: k8s
    # here a global env var BUILDKIT_HOST with tcp address, 
    # I manually deploy buildkit in k8s cluster
    - dagger do x
chilly arch
#

@here Recently, we did a first alpha release of Dagger Cloud: https://docs.dagger.io/1241/dagger-cloud

The tool gives you the ability to centralize telemetry from your engines and visualize it, which will help you debug faster.

Thank you to everyone who has taken the time to try it out and provide feedback. If you have already tried Dagger Cloud, but haven’t been able to provide feedback, we’d appreciate if you could give us some here: https://blocklayer.typeform.com/to/wuQLS5Gz

If you want to learn more, we’d be happy to walk you through a demo. Just pick a time that works best for you: https://savvycal.com/dagger/cloud-feedback

stoic knot
#

Howdy, got a little use case that I'm wondering if Dagger would cover without having to adopt too much Dagger (team is hesitant due to the newness, but I think this is a good use case)

  1. They are still going to want to use Dockerfiles, ideally loaded from disk, but possibly defined as a CUE string
  2. The context is JS but applies equally well to Go
  3. They have a multistage dockerfile which builds an app for production, an early layer fetches the deps
  4. It does not test, the goal is to add this plus SonarCloud scanning, but we don't want to redo the dep fetch, because NPM / node_modules...
  5. We don't want to add the testing to prod builds, or figure out how to have conditional sections of a Dockerfile (unless that is easy?)

So I'm envisioning something like

dependencyLayer
  - stages for building prod
  - test with output to tty
  - test w/ coverage to file, run Sonar

It's a DAG, and if I have to do it without the (ger) I'm looking at having to use 4 dockerfiles & images, whilst dealing with tags under concurrent builds and passing them in as ARG to the dockerfile

So I guess my question, "is it possible to define the DAG with Dockerfiles while still getting the layer caching?"

#

One benefit to Dagger I see is that I can run the SonarCloud container against a layer, rather than having to install SonarCloud in every Dockerfile setup, or having to deal with setting up the mounts to the host FS

slender star
#

@stoic knot Happy to try this out with you! 👋 With some Dockerfiles in hand, I'd think we could do something that is a hybrid of https://docs.dagger.io/1205/container-images/#multi-stage-build and https://docs.dagger.io/1205/container-images/#executing-a-dockerfile

You can use Dagger to build container images, either by executing a Dockerfile, or specifying the build steps natively in CUE. Which method to choose depends on the requirements of your project. You can mix and match builds from both methods in the same plan.

stoic knot
#

Thanks @slender star , I'm going to be prototyping 3 alternatives starting today, including this option

balmy orbit
#

i'm sure this has probably been mentioned before, but i just came across this, and it put my mind at quite a bit more ease as to why using Cue VS JSON or YAML is a good thing, also helps me to stop thinking of Cue as a programming language and just a data/config language - https://bitfieldconsulting.com/golang/cuelang-exciting

#

i may even start using Cue to validate existing YAML configurations we have developed in-house

#

so just thinking of Cue as JSON-on-steroids helps 🙂

turbid tulip
# balmy orbit i'm sure this has probably been mentioned before, but i just came across this, a...

also helps me to stop thinking of Cue as a programming language and just a data/config language

so just thinking of Cue as JSON-on-steroids helps

Yeah, I generally agree with this sentiment. I think another way of thinking about CUE is as a constraint language.

You can specify the shape of other data. Note that a concrete value is really just a constraint. 🙂

Once I grokked that, it really helped me understand how to use CUE.

jade mist
#

hi all i have a question, i'm trying to use Dagger to build Dockerfile. How do I implement buildArgs to take in output from git last commit hash so that the information will be built with the new docker image.

slender star
#

hi all i have a question i m trying to

balmy orbit
#

if i make a param optional (ie myfield?: string) what is the standard way to check if it's defined in Cue ?

#

if myfield { // blah } ?

slender star
#
foo?: bool //or whatever
...
if foo != _|_ {            something: foo
}
balmy orbit
#

yeah i was wondering about that ... but i couldn't google properly to figure out what _|_ was precisely lol

turbid tulip
balmy orbit
turbid tulip
jade mist
#

are there any support for kubernetes?

clever mesa
# jade mist are there any support for kubernetes?

For run dagger in k8s:

You could use this to deploy buildkit.
https://github.com/moby/buildkit/blob/master/examples/kubernetes/deployment%2Bservice.privileged.yaml
the certs part could be removed.

Then BUILDKIT_HOST=tcp://buildkitd:1234 dagger do

For k8s apply:

Cue could import and gen definition from go sources.
So you could define your own struct like https://github.com/innoai-tech/runtime/blob/main/cuepkg/kube/app.cue
Then render multiple manifests into yaml or json, and write & mount to image contains kubectl to run kubectl apply.

mystic mantle
# jade mist are there any support for kubernetes?

Is the question about : can we deploy to kubernetes thanks to dagger? If yes, there is a package in universe which is about that: https://github.com/dagger/dagger/tree/main/pkg/universe.dagger.io/alpha/kubernetes
(can't wait to have a correct reference documentation to point to it :))

GitHub

A portable devkit for CI/CD pipelines. Contribute to dagger/dagger development by creating an account on GitHub.

stoic knot
hollow terrace
vagrant tiger
#

Hey dagger friends. I see that dagger has a solid story when it comes to CI. Y'all have anything re: pipelines? e.g. shuffling between dev, prod and relevant quality gates.

wraith niche
vagrant tiger
wraith niche
# vagrant tiger I don't see a notion of dev vs prod for deploys etc. Can you point me to configs...

The first guide in the docs shows how to dev locally, then integrate into your CI for that purpose. But they are many patterns quite trivial to implement. For instance, run an app locally for dev, deploy remotely for staging, then change the config for prod. Can also map a git branch to a particular deploy config, that way you can auto deploy changes to staging or prod from your CI, following changes on a particular branch. We are in the process of writing more guides in the docs, if you have a use case in mind, it can inform the next guide. And we can also chat live to show the different patterns.

vagrant tiger
swift inlet
hollow terrace
#

Is there a way to switch the runtime dagger-buildkit uses?

#

Specifically to nvidia-container-runtime as it would enable gpu access and stop the need to invoke docker/cli instead of docker package

swift inlet
hollow terrace
#

Buildkit uses runc as the default runtime for executing the instructions provided to it. There is an option —oci-worker-binary that allows switching it to other options such as nvidia-container-runtime or kata-runtime.

#

nvidia-container-runtime allows running gpu accelerated code in containers, which is extremely useful for machine learning/AI applications

paper shore
#

You can run your own buildkit with those flags and specify it with BUILDKIT_HOST=$addr dagger do actions

hollow terrace
#

Thanks I will try it

radiant talon
#

Hello all, I wanted to ask a bit about nesting dagger projects... From my understanding of Cue, I think my idea could work, but I want to check in here before I talk to our CTO about the idea. I'll kick off a thread to explain what I mean

jade mist
#

Hi again, is there a way to install a Debian package noninteractively? Do I need to create my own cue module for this? Or do I need to set DEBIAN_FRONTEND=noninteractive as ENV in the dagger plan?

rain oriole
#

If not exactly what you want you can at least copy into your own and change it.

balmy orbit
#

so... new situation, i have a file that is used to describe vendor deps... that file is frequently re-saved (some third-party process beyond my control) but 95% of the time, the content of the file doesn't change ... so, i'd like my mount and copy operations that act on that file (the file is the lone item in a docker.#Image only when it's checksum has changed

jade mist
dusty storm
#

HI i'm a newbie with dagger i'm trying to clone a github repo using this code, but i get the error missing comma in struct literal, also if some one can guide me on cloning using ssh instead of https.

Also what is the/are best resources to learn dagger

package first

import (
"dagger.io/dagger"
"dagger.io/dagger/core"
// "universe.dagger.io/git"
)

dagger.#Plan & {
actions: {
pull: core.#GitPull & {
remote: "https://<Repo_URL>"
ref: "Develop"
auth?: {
username: <username>
password: dagger.#Secret <password>
}
}
}
}

balmy orbit
#

hrm, i need a core.#Source and perhaps other machinery that only indicates files have changed from the source if their checksums changed, not if their lastmod changed

sharp marsh
balmy orbit
#

dagger project update github.com/someuser/somedagger is the standard way of third-party packages correct? what if the repo is private ?

rain oriole
balmy orbit
#

i need to provide the key password on the command line? i was hoping it'd use ssh-agent

rain oriole
#

You can see these arguments with dagger project update --help.

#

What's not documented is that right now, using --private-key-file switches the protocol to SSH, otherwise it's HTTPS.

balmy orbit
#

looks like i'm gonna have to setup a separate passwordless id_rsa because i'm not putting my ssh password in plain text in the console 😉

#

for now it may make more sense simply to manually copy the files to the appropriate cue.mod location

rain oriole
#

Yes, that makes sense. I was going to take that one on (user agent), but got deprioritized.

pseudo stream
#

IIRC buildkit only invalidated the cache

slender star
# swift inlet Yes: a plan is a serie of actions. Each action is a serie of steps that would in...

@vagrant tiger great to see you in Dagger Discord! 👋 As @wraith niche stated, we're very flexible in how we can fold into an existing CI or CD system. The Dagger Plan does have pipeline-like qualities, but can run without conflict inside another pipeline tool. Guessing you saw some of the CI integration tips here? https://docs.dagger.io/1201/ci-environment

As far as CD goes, Dagger could be called from any number of CD tools or could report back to them as well. What do you think would be a good reference CD implementation to flesh out similar to our CI examples?

Once you have Dagger running locally, it's easy to use Dagger with any CI environment (no migration required) to run the same Dagger pipelines. Any CI environment with Docker pre-installed works with Dagger out of the box.

vagrant tiger
tribal sedge
#

hello everyone, i was wondering, is it advisable to commit cue.mod directory. or how do you all do it

mystic mantle
tribal sedge
mystic mantle
#

Like, if you would commit your node_modules directory in your project repository.

#

So, yes, commiting your cue.mod dir in your project directory is vendoring it.

balmy orbit
#

anyone have an example github actions workflow that runs dagger via arm64 arch ?

versed oasis
#

Hi folks! Good to be here ^^ I am just getting started with Dagger and hope to get valuable insights and answers to some of my questions here 🙂

sharp marsh
#

anyone have an example github actions

sharp marsh
stoic knot
#

Question regarding running Dagger with a remote BuildKit...

  • does the "docker build" happen on the remote or use the local docker daemon?
  • does the "COPY" need to transfer files over the network (outside of layer transfers)
    Wonder what the story to scale out build executors looks like. We have a bunch of hefty workers to support our builds, would those resources need to move to BuildKit?
#

Or is BuildKit acting more like a shared cache and registry

slender star
#

Question regarding running Dagger with a

fossil pine
#
DEV Community

Originally published at https://sagikazarmark.hu. In my previous post I explained the basic steps...

Blogged about building a CI pipeline for a @golang
CLI app with @dagger_io

https://t.co/56Dq8z6sZS

The complete example is available here:
https://t.co/sREslJUZyF

GitHub

Contribute to sagikazarmark/dagger-go-cli development by creating an account on GitHub.

fossil pine
#

Is it possible to run docker containers with Dagger for things like integration tests? For example, run a MySQL container next to the test container and kill it once it's not needed anymore (ie. the test finished).

swift inlet
fossil pine
swift inlet
#

This doc would be a very good example. Basically, we chained everything inside the test action -> It spins up the test, tests it and tears it down, all in one action

rain oriole
vestal creek
thin sigil
#

Hey guys. I absolutely love the work the dagger team is doing!! Great work.

I made a video on Dagger based on my understanding. Do let me know if I've missed something out. Would love to make more content with you guys.

https://youtu.be/Jtvc5X1XNqs

Can Dagger change the way we write CI/CD Pipelines?

CI/CD Pipelines have become an essential part of our software development lifecycle. While they make releasing reliable software a lot easier, they add a a degree of complexity and introduce a bit of a learning curve for development teams.

Dagger aims to solve much of these challenges by stan...

▶ Play video
rain oriole
# thin sigil Hey guys. I absolutely love the work the dagger team is doing!! Great work. I m...

That's great, thanks! 🙂

Small correction though, Dagger doesn't require Docker. The only dependency is BuildKit. It's simple to get started if you have Docker installed, but you can have BuildKit running in K8S or other environments, in which case Dagger should run just fine in any of those (https://github.com/moby/buildkit#containerizing-buildkit, https://docs.dagger.io/1223/custom-buildkit/).

I also don't agree that dagger is more appropriate for platform builders as of now. Many users use if it for their own apps, me included. 🙂

thin sigil
sharp oracle
#

Not quite sure if here or #help-old-do-not-post is a better place to ask, but – our current image building pipeline uses a git log of files that go into the build context to decide what the image tag will be. Would it be possible to do the same from inside Dagger?

wispy tapir
sharp oracle
#

But how would the script know what file went into the build? I see there's something called FS – would I for example had to build my Docker build context using FS and then use that both for building the image and knowing what files to look at with git log?

slender star
#

@sharp oracle Guessing you're doing something like in https://blog.scottlowe.org/2017/11/08/how-tag-docker-images-git-commit-information/

Yes, it's easy for Dagger to read in a filesystem tree (dagger.#FS) from your local filesystem (core.#Source) or pull from a git server (git.#Pull) and then build the image from Dagger commands or a Dockerfile (docker.#Dockerfile).

Then you can run a command against that same filesystem in bash (bash#Run): e.g. git log -1 --format=%h, then use that output to form up a tag string and then push the image your build to a registry (docker.#Push).

chilly arch
thin sigil
chilly arch
slender star
#

jaen0732 Guessing you re doing something

sharp marsh
#

@here 👋 Dagger Community. We'd like to share with you some really cool features that we shipped last week that you can start using today starting with dagger version 0.2.23 on-wards:

  • Dagger Cloud (https://docs.dagger.io/1241/dagger-cloud/) will now upload plans that are not fully dagger compliant. This will allow you to share with us your Dagger Cloud URL so we can assist you better to unblock you.
  • Dagger Cloud now displays the time actions took to execute
  • dagger doc command now supports markdown formatting with both light and dark themes.

Hope this new features help you navigate dagger better while allowing us to provider better assistance. If you have any suggestions or comments, please send them here or through issues in the dagger/dagger GitHub repo.

You can get the latest dagger binaries here: https://github.com/dagger/dagger/releases/tag/v0.2.23.

Dagger Cloud is under development, but we have just released the first telemetry feature!

rain oriole
#

@vestal creek just confirmed that you don't need the path in module. You may have seen in the spec that you need it on import, but that's different. 🙂

vestal creek
#

@rain oriole 😮

#

I feel like my whole life is a lie

rain oriole
turbid tulip
#

Gotcha. You can have just the domain?

rain oriole
verbal canopy
swift inlet
verbal canopy
verbal canopy
swift barn
#

I have worked on a helm.#Upgrade action. I feel like it's more complete than the helm action in alpha. Therefore, I would like to make a PR, is there a specific process to do so? I have read the guide https://docs.dagger.io/1227/contributing, but I am not quite sure.

swift inlet
swift inlet
swift barn
swift barn
#

what is the advantage of client.filesystem vs core.#Source?. The only thing I can think of is that client.filesytem can go outside of the package root.

winter linden
#

client.filesystem follows your current working directory on the client host machine. Different behavior, depends on what you want

#

In practice core.#Source is usually better IMO

swift barn
#

I also think core.#Source has some advantages. One of them is that you can have it outside of dagger.#Plan. I think its not quite clear from the documenatation, that source may be the preferred way in most cases.

swift barn
#

I want to mount a directory but its content is secret. Seeing that dagger.#Secret only works on files, I am wondering what are the implication of using dagger.#FS. Is the content cached, or even sent via telemetry?

swift inlet
swift inlet
swift barn
#

that should be good enough. thanks 🙂

winter linden
#

Only downsides are 1) contents will be in buildkit cache, 2) contents are mounted in container slightly less securely

#
  • no log scrubbing as mentioned by @swift inlet
dusty pelican
#

Just starting to pick up and play with Dagger. Coming from a Jenkins / Pipeline as Code / shared library background.

I'm curious how "universal" or "broad" the Dagger Universe packages really are or do most individuals/teams build from the ground up? I'm following the todoapp example and can't get too far since we're using an internal NPM registry.

Not seeing how to extend the yarn universe package to do something like this (i.e. run create a new action that uses bash to run yarn config set registry xyz.com and have the yarn .#Script "depend" on that new action as it doesn't accept a env or input property as shown in the chaining actions docs)

slender star
#

Yarn package extension

tacit birch
#

I could’ve swore i saw a Dagger.io sticker on a car yesterday in Oregon

turbid tulip
tacit birch
#

I5 south just before hitting the 217 merge

turbid tulip
#

@slender star, perhaps? 🙂

vestal creek
vestal creek
#

Demo in morning. It’s nearly 1am 😊

mystic mantle
harsh ore
#

Hey ya'll!

#

Dagger vs Waypoint any takers ? 🤔

sharp marsh