#general
1 messages · Page 16 of 1
Thanks for the meetup and for the answers, 🚀
Thanks for joining!
Welcome @topaz hill!
Welcome @nimble thistle!
Welcome @jaunty folio!
Welcome @crimson prawn!
Welcome @sturdy laurel!
congrats on the launch!!
Would love to be a part of dagger's journey if you are accepting interns too.
Thanks! Now we can get back to work and fix all those bugs 😉
We don't have an internship program yet but plan to launch one very soon. Feel free to DM @rustic shard for more details, she runs our hiring process and is working on setting up those programs.
Happy to work with you! As @winter linden mentioned, DM me for details, and I would be happy to support you once this finalizes.
Welcome @cloud helm!
Welcome @robust tundra!
Welcome @glacial sorrel!
Welcome @covert iron!
Welcome @vivid lake!
Welcome @upbeat lava!
Welcome @dull copper!
Welcome @azure forge!
Welcome @tacit halo!
Welcome @celest cargo!
Welcome @blissful garnet!
Welcome @heady viper!
Hi everyone! We are here to answer any questions. The documentation is still a work in progress... If you are missing information we will gladly fill the gap here.
Welcome @swift barn!
Welcome @hexed prawn!
Welcome @thin pulsar!
Welcome @winged radish!
Welcome @uncut hatch!
Welcome @swift barn!
Welcome @eager blade!
Welcome @faint sleet!
Hi there
I finally found the time to get back to dagger
Last time i launch dagger it was v0.1
Need time to adapt to this new release 😄
@blissful bone welcome back 🙂 If you need to migrate a 0.1 config, we are here to help!
thanx @winter linden
I'm going to restart from scratch
I have some use case to test
Welcome @sonic adder!
Welcome @floral bison!
Welcome @austere dome!
Welcome @latent terrace!
Welcome @scenic mortar!
Congrats guys
Thanks @austere dome 
Welcome @limpid cipher!
Welcome @swift barn!
Welcome @granite sail!
Welcome @tawdry latch!
Welcome @elfin marsh!
Welcome @broken bough!
Welcome @devout helm!
Welcome @paper flint!
Welcome @autumn thistle!
Welcome @crystal fog!
Welcome @strong ingot!
Don’t forget to star https://github.com/dagger/dagger if you haven’t already!
Congratulations on the launch, exciting times ahead ❤️
Thanks! Exciting times indeed!
Welcome @wheat blade!
Welcome @tepid robin!
Welcome @shy surge!
Welcome @jolly fable!
Welcome @swift barn!
We have passed 1000 followers on Twitter 🎉🚀 https://twitter.com/dagger_io
A portable devkit for CICD pipelines, by the creators of Docker. Powered by CUE and Buildkit. https://t.co/ojiN8fWCeI
1015
83
Welcome @stable brook!
Welcome @next wigeon!
Welcome @turbid relic!
Welcome @dapper galleon!
Welcome @tender anchor!
Welcome @tribal swallow!
Welcome @delicate dirge!
Welcome @charred anchor!
Welcome @unborn mango!
Welcome @hexed ridge!
Welcome @proper elk!
Welcome @summer geyser!
Welcome @hot pine!
Welcome @merry current!
Welcome @swift barn!
Welcome @severe pike!
Welcome @tardy copper!
Welcome @swift barn!
Welcome @pliant arch!
Welcome @bright pulsar!
Welcome @wide wadi!
Welcome @swift barn!
Welcome @robust kernel!
Welcome @bitter gulch!
Welcome @merry wedge!
Welcome @swift barn!
wassup
Welcome @drifting valley!
Welcome @autumn wren!
Welcome @sage night!
Welcome @kindred imp!
Welcome @latent pivot!
Welcome @upper reef!
Welcome @elfin stag!
Welcome @devout bluff!
Welcome @indigo trail!
Welcome @vital pond!
Welcome @strong isle!
Welcome @iron flower!
Welcome @knotty solar!
Welcome @strong raptor!
Welcome @shadow mulch!
Welcome @lapis bolt!
Welcome @broken bear!
Welcome @fluid sinew!
Welcome @fast geode!
Welcome @frigid otter!
Welcome @tired helm!
Congrats on the official launch team 🚀
Welcome @swift barn!
Welcome @compact fog!
Welcome @lethal canopy!
Welcome @wicked dove!
Welcome @stable stratus!
Welcome @sharp blaze!
The docs are pretty nice
Welcome @woeful mulch!
Welcome @sage coyote!
Welcome @rain condor!
Welcome @strange hearth!
Thanks Victor! Just like the good old days 🤗
Welcome @next widget!
Welcome @red zodiac!
Welcome @icy tartan!
Welcome @swift barn!
Welcome @fathom lantern!
Welcome @atomic nest!
Welcome @brazen plover!
Welcome @quartz granite!
Welcome @wet arrow!
Welcome @wispy island!
@winter linden I remember there being some documentation on the goal of dagger universe, which I cant find on the new docs. I want to write a bit about Dagger and would like a first party reference
Welcome @haughty moat!
Welcome @potent gulch!
Welcome @hard zephyr!
Welcome @bold moss!
Welcome @errant lance!
Welcome @west bluff!
I've just skimmed through the dagger website and I'm wondering how different its gonna be from something like ansible or terraform
Heck, maybe pulumi?
we haven't migrated this page from the previous docs yet, but it's still relevant to your question: https://docs.dagger.io/1002/vs/
Dagger vs. CI (Github Actions, Gitlab, CircleCI, Jenkins, etc.)
Welcome @stone osprey!
Welcome @hushed gale!
Welcome @ivory zinc!
Welcome @true marsh!
Welcome @crude barn!
Welcome @carmine knoll!
Welcome @candid sparrow!
Welcome @surreal sparrow!
Welcome @mint rampart!
Welcome @vagrant vault!
Welcome @humble token!
Welcome @nocturne surge!
Welcome @cedar condor!
Welcome @fiery condor!
Welcome @swift barn!
Welcome @tender ginkgo!
Welcome @winged latch!
Welcome @fallen pewter!
Welcome @civic atlas!
Welcome @sweet grail!
Welcome @dusky inlet!
Welcome @heavy fiber!
Welcome @slate wasp!
Welcome @mortal socket!
Welcome @coral fjord!
Welcome @harsh harbor!
Welcome @worldly cobalt!
Welcome @keen canopy!
Welcome @foggy perch!
Welcome @vapid stag!
Welcome @sage whale!
Welcome @muted marten!
Welcome @unborn citrus!
Welcome @hasty silo!
Welcome @west hawk!
Welcome @viscid burrow!
Welcome @dusk lance!
Welcome @wild light!
Welcome @solid oxide!
Welcome @astral smelt!
Welcome @woven trout!
Welcome @sonic minnow!
Welcome @royal oak!
Welcome @icy fjord!
Welcome @grizzled fable!
Welcome @void swan!
Welcome @cloud kettle!
Welcome @astral moss!
We might have to disable that auto-welcome bot soon 😅
Welcome everyone.
Welcome @left falcon!
Welcome @sweet patio!
Welcome @steep sequoia!
Welcome @ocean mural!
Welcome @ruby tinsel!
Welcome @restive void!
Welcome @shell juniper!
Welcome @dense rampart!
we can move the welcome messages to a new channel named #welcome probably and organise a bit !
Welcome @novel frost!
Welcome @gaunt timber!
Welcome @frozen basin!
Welcome @full dome!
Welcome @ember thorn!
Welcome @digital dawn!
Welcome @urban kettle!
Welcome @dusky oak!
Welcome @strong finch!
Welcome @calm nebula!
Welcome @vast violet!
Welcome @dense lion!
Welcome @stray cloud!
Welcome @sly finch!
Welcome @arctic geyser!
Seriously, why “Dagger”?
Dagger is a fully static, compile-time dependency injection framework for both Java and Android. It is developed by the Java Core Libraries Team at Google.
Welcome @rancid terrace!
Welcome @errant drum!
Welcome @opal snow!
Welcome @thorn surge!
Welcome @barren quiver!
Welcome @swift barn!
Welcome @amber adder!
Welcome @hasty cosmos!
Welcome @dense pollen!
Welcome @wind coral!
Welcome @sour ivy!
Welcome @whole barn!
Welcome @near python!
Welcome @vocal crane!
related to DAG graph AFAIR ping @winter linden for better explanation 🙂
Welcome @edgy swan!
Welcome @finite agate!
Welcome @oblique portal!
Welcome @swift barn!
Welcome @swift barn!
Welcome @silent oak!
Welcome @hazy phoenix!
Welcome @frank heart!
Welcome @past spindle!
Welcome @vale flower!
Welcome @wicked pivot!
Welcome @charred dragon!
Welcome @red violet!
Welcome @clever blaze!
Welcome @opaque agate!
Welcome @modest fossil!
Welcome @little sky!
Welcome @thin tartan!
Welcome @oblique mural!
Welcome @plain grail!
Welcome @upbeat nimbus!
Welcome @fast zodiac!
Welcome @random hornet!
Welcome @main basin!
Welcome @swift barn!
Welcome @tardy birch!
Welcome @swift barn!
Welcome @unborn tundra!
Welcome @cedar hearth!
Welcome @swift barn!
Welcome @sullen wyvern!
Welcome @swift barn!
Welcome @woeful beacon!
Welcome @somber kiln!
Welcome @outer meteor!
Welcome @quiet obsidian!
Welcome @inner salmon!
Welcome @alpine pagoda!
Welcome @olive crater!
Welcome @zealous minnow!
Welcome @stark ermine!
Welcome @river thorn!
Welcome @honest lichen!
Welcome @urban harness!
Welcome @vast dome!
Welcome @pulsar estuary!
Welcome @neat needle!
Welcome @proven kestrel!
Welcome @magic fjord!
Welcome @quasi moss!
Welcome @foggy token!
Welcome @dusk ridge!
Welcome @sour shell!
so i was interested in what the helm integration looked like, but it seems that iwas only in dagger 0.1 is that right?
im also curious how it would look to use dagger w/ a gitops based flow with something like argocd. atm it seems dagger is responsible for applying manifests to the k8s API.
Oh yeah this would be very interesting
yeah, im trying to think of what I would want it to look like, but im not sure yet. a big benefit is the coupling between build+deploy, but we all know it's often necessary to decouple those bits, but still keeping it streamlined is important.
Yes, we're adding based on user feedback: https://github.com/dagger/dagger/discussions/1922
With the latest dagger version (0.2), it's fully declarative so it's compatible with gitops. I think with k8s, it's better to always send manifests to it and let it decide what to apply instead of caching on dagger's side.
i suppose in a gitops flow i would have a pipeline like this:
- build image
- deploy == "update a manifest/config with the image tag/git commit" + "git commit && git push". so a dagger action could be some form of that either using shell or something that would understand updating dagger configs directly, plus the git aspect.
then
- argocd gets triggered via the update to the git repo
- runs a 'dagger' plugin that renders the YAML in the repo
something like that maybe.
it's less about being declarative and more about moving the 'kubectl apply' to a different system and having dagger render just the YAML to be consumed
You can also use dagger to build your manifests as an output and save those to the repo you're monitoring with gitops. Including updating the image ref, creating a commit and pushing it.
id rather avoid building them and saving them to the repo, but it's not a terrible idea, as having fully rendered out manifests makes it easier to see what changed.
but in practice that doesn't work well when everything is in the app repo. also it tends to balloon repo sizes quite fast and that has it's own issues.
Welcome @wheat storm!
is there a comparison between dagger and other ci/cd tools ?
We've realized that people requested it. We're on the process of making a doc page about it 😇
Welcome @swift barn!
please include both traditional and cloud native tools
Which ones would you want to see ? Could you please create an issue out of it in order for us to keep track ? 😇
Welcome @fathom sierra!
sure I'd love to
We used to have one on the previous version of the doc: https://docs.dagger.io/1002/vs/. But we will expand it with all your recommendations 😇
@winter linden any thoughts around secure supply chains and SLSA (https://slsa.dev/) and dagger ? (integrations, slsa levels, …)
Welcome @broken junco!
Welcome @hollow vector!
Welcome @vivid granite!
Welcome @tawny cloak!
Welcome @swift barn!
Welcome @fallow hound!
Welcome @dusty anvil!
Welcome @valid glade!
Welcome @daring fog!
Welcome @slim hatch!
Welcome @swift barn!
Welcome @deep totem!
Welcome @buoyant bloom!
Welcome @normal stone!
Welcome @finite flame!
Welcome @ivory dagger!
Welcome @hoary otter!
Welcome @abstract pebble!
Welcome @hardy geode!
Welcome @azure shard!
Welcome @teal sage!
Welcome @humble berry!
Welcome @swift barn!
Welcome @wintry dust!
Welcome @swift barn!
Welcome @faint vortex!
Welcome @round acorn!
I would be interesting in seeing what Pipelines everybody uses. I am tired of Jenkins. I've grown to hate it.
I think that this discussion might be a good starting point 😇 https://github.com/dagger/dagger/discussions/1677
Welcome @solid gorge!
Welcome @desert stirrup!
Welcome @idle vessel!
Welcome @proven bronze!
Welcome @tranquil hill!
Welcome @tough radish!
Welcome @honest wing!
Welcome @copper briar!
Welcome @cloud socket!
ho hello you =o
This is becoming spammy here, it might needs a welcome chan :D
👋 Hello! After reading https://docs.dagger.io/1201/ci-environment, I was wondering if Dagger could take advantage of the parallelization features of existing CI/CD systems; e.g. by transpiling to the native workflow syntax:
Dagger
(generic code that translates to the specification below)
GitLab CI/CD
one:
when: manual
script:
- echo one
two_a:
needs: [one]
script:
- echo two_a
two_b:
needs: [one]
script:
- echo two_b
three:
needs: [two_a, two_b]
parallel:
matrix:
- PART: [1, 2, 3]
script:
- echo three $PART
GitHub Actions
on: workflow_dispatch
jobs:
one:
runs-on: ubuntu-latest
steps:
- run: echo one
two_a:
needs: one
runs-on: ubuntu-latest
steps:
- run: echo two_a
two_b:
needs: one
runs-on: ubuntu-latest
steps:
- run: echo two_b
three:
needs: [two_a, two_b]
strategy:
matrix:
part: [1, 2, 3]
runs-on: ubuntu-latest
steps:
- run: echo three ${{ matrix.part }}
Welcome @peak anchor!
Welcome @swift barn!
Welcome @stiff oak!
Welcome @keen apex!
Also, is it possible to run several actions in parallel? I.e. build a cough DAG?
Welcome @stuck basalt!
Welcome @sly wasp!
Welcome @cobalt crater!
Welcome @tough mesa!
All actions are run in parallel by default, but in the same machine 😄
I'm not sure I understand what is the idea, you would like to convert a Dagger plan into GitHub action?
Welcome @slim elbow!
Welcome @digital hinge!
Welcome @thorny violet!
Welcome @alpine valley!
Welcome @lean imp!
Welcome @runic cloak!
Welcome @rough sierra!
Welcome @nocturne quest!
Welcome @waxen void!
Welcome @coarse sorrel!
Welcome @nocturne moth!
Welcome @swift barn!
Welcome @supple blaze!
Welcome @swift barn!
Welcome @civic quartz!
Welcome @stoic sentinel!
Welcome @drowsy lotus!
Welcome @grim oriole!
Unless you specify input (?) If that's correct, is it possible to depend on several inputs?
Yes you can, thanks mount, you should take a look at our Dagger CI (we use Dagger to build Dagger), it depends on multiple inputs 😉
https://github.com/dagger/dagger/blob/main/ci/main.cue
Any field can reference another field in another action, creating possibly multiple dependencies.
That's where dagger comes from 😛
Hence the “cough” above: #general message 😈
Yes to wrap a Dagger plan in a GitHub Actions worflow or a GitLab CI/CD pipeline for example, so GitHub/GitLab/... can understand the structure of the Dagger Plan and distribute tasks over different machines.
Something like this:
on: workflow_dispatch
jobs:
one:
runs-on: ubuntu-latest
steps:
- run: dagger do one
two_a:
needs: one
runs-on: ubuntu-latest
steps:
- run: dagger do two_a
two_b:
needs: one
runs-on: ubuntu-latest
steps:
- run: dagger do two_b
three:
needs: [two_a, two_b]
runs-on: ubuntu-latest
steps:
- run: dagger do three
I believe Buildkit supports distributed workers, it's just how that integrates with GH Actions
You can do it like that too, but limited on what you need to pass from one step to the other.
Welcome @tender goblet!
Welcome @reef crown!
Welcome @slate summit!
Welcome @steep pond!
Welcome @crisp cypress!
Welcome @lime niche!
Welcome @neat crane!
Welcome @swift barn!
Welcome @dense vapor!
Welcome @river imp!
Welcome @sonic reef!
Congrats on the launch yall!
Now I can finally easily pester my team with links without making them sign up first 
Welcome @swift barn!
Welcome @bold cliff!
Welcome @normal adder!
Welcome @unreal parrot!
Welcome @jade mist!
Welcome @untold ravine!
Welcome @misty sail!
Welcome @fair igloo!
Welcome everyone! FYI I just disabled automated welcome messages, now that we're public and more people are joining, it's a bit overwhelming 😅 But you are still just as welcome!
OK, I don't think that worked @wispy tapir 😉
Welcome @wanton yew!
Actually that setting was for a different feature @wispy tapir , we need to turn off "DaggerBot". Help @cloud canyon
We have a bot rebellion on our hands
Ahhhh it comme from @autumn swallow 😮
Welcome @tall iron!
So yes, you must update the configuration from that bot, my bad
OK I think I found it
I just opened Docker desktop to work through the QuickStart, one of my old containers is ‘trusting_solomon’, seems fitting today.
Ha! I am in fact a very trusting person. Accurate container name.
Hasn’t led me wrong yet…I’ve trusted you before that Docker would be a Big Deal, why not now with Dagger?
Hey all, I'm trying to figure out how to clone a Git repo into an ephemeral directory in Dagger and I'm having a hell of a time. Can anyone point me in the right direction or show an example? Thanks!
There’s a package universe.dagger.io/git
You can use the git.#Pull action and it will output the repo contents as a dagger.#FS
$ cat example.cue
package main
import (
"dagger.io/dagger"
"universe.dagger.io/git"
)
dagger.#Plan & {
actions: pull: git.#Pull & {
remote: "https://github.com/dagger/dagger"
ref: "main"
}
client: filesystem: "./result-of-git-clone": write: contents: actions.pull.output
}
$ dagger do pull
$ ls ./result-of-git-clone
Source code to the git package: https://github.com/dagger/dagger/tree/main/pkg/universe.dagger.io/git
(which in the case of git, is actually a wrapper to the core action core.#GitPull, since Dagger has native support for git)
And I can probably pick out specific files from the Git directory via fs.#Copy?
Yes #Copy or #Readfile depending on what you need
👍 Thanks. Any chance there's an LSP for Cue that I can plug into Vim? Not having syntax highlighting is killing me
Ah, filetype plugin but no LSP. Still helps though.
Would you mind opening an issue describing what woukd be the ideal vim setup for you? That would be very helpful!
Will do when I get a better internet connection. Currently on a plane
Hrm, having trouble wrapping my head around how fs.#Copy would work in this scenario
I'm passing the output of my git.#Pull step to the input of fs.#Copy.
I'm expecting to be able to supply a list of strings of files to pull out
what’s the full import path of that fs package?
#Copy is not the right action then. That takes 2 #FS as input and produces a new #FS as output, it doesn’t read the contents of the files into CUE. For that you want to use core.#ReadFile
Here are all core filesystem operations: https://github.com/dagger/dagger/blob/main/pkg/dagger.io/dagger/core/fs.cue
Currently core.#ReadFile only supporte one file at the time, but we can create a new action that reads several, as you described. In fact you can create one yourself in CUE by wrappin multiple #ReadFiles in a for loop
It’s also possible that #Merge could be useful for this, if you’re wanting a file system state.
Or just use the change from this PR… https://github.com/dagger/dagger/pull/1983 🎩 @cloud canyon
Signed-off-by: Andrea Luzzardi aluzzardi@gmail.com
Hi all! I am curious, what is "the stage" channel?
This is what we used in order to have our community event the day of the launch. We couldn't have too many guests in the #dev-audio channel, so we used this new feature from discord called The Stage.
But for now, there is nothing on it anymore
The Stage can hosts more people, but without video
Thanks @mystic mantle
@winter linden I think I explained things poorly. I'm trying to basically copy 2 files from a remote repo into the current working directory, then throw the remote repo away.
Ah I see! Perhaps we can use the newly merged support for include/exclude in core.#Copy?
Let me try real quick
Here you go @wild bluff 🙂
package main
import (
"dagger.io/dagger"
"dagger.io/dagger/core"
"universe.dagger.io/git"
)
// Pick certain files from a remote git repository
#GitPick: {
remote: string
ref: string
pick: [...string]
output: dagger.#FS & _copy.output
_fetch: git.#Pull & {
"remote": remote
"ref": ref
}
_copy: core.#Copy & {
input: dagger.#Scratch
contents: _fetch.output
include: pick
}
}
dagger.#Plan & {
actions: pick: #GitPick & {
remote: "https://github.com/dagger/dagger"
ref: "main"
pick: ["README.md"]
}
client: filesystem: "./output": write: contents: actions.pick.output
}
can someone ELI5, I am having a hard time understanding how dagger compares to something like the dsl's of jenkins and stuff. ive read the docs a few times and I get how cuelang is useful for data transfers but Im lost on how it fits the CI use-case well
Think of it as a replacement for your makefile. Sometimes you want to run it during development; sometimes from CI. Ideally you write automation logic once, and it works the same everywhere.
okay I think that makes sense to me
So it doesn’t replace jenkins (it’s not a CI runner) but it can do a lot of the things your CI runner can do, only better and more portable. So over time your CI configuration shrinks, until it’s just “run dagger”
thank you, i guess the follow-up would be what do you see the pitfalls of the makefile method that is addressed by dagger?
Jenkins, Github Actions etc. have this primitive concept of atomic actions/steps on the one hand, and high-level workflows/pipelines on the other. In Dagger there is only actions: an action can be made of other actions, etc as deep as you need. So Dagger actions are Github Workflow and Action rolled into one. That composition model is the real superpower of Dagger.
Well the Makefile model is fundamentally good. That’s why it’s lasted so long. But the language is old, there’s no strong composition model, it doesn’t benefit from the Docker ecosystem for host-independence, it’s a file-oriented build tool that was hacked with phony rules to do general purpose automation. It’s just time to retire it.
The most powerful aspect of Make of course is that it’s a declarative DAG layout + an imperative script for individual actions. That remains the best model for supply chain problems
With GitHub composite actions allowing reuse of other actions in a similar fashion and the storage of those workflows in the repo itself, what makes Dagger stand out?
Same thing that made Docker stand out from Openstack, even after they added support for containers
Some things you can’t bolt on
(I mean there are other things too but I’n watching a 3yo and 1yo so went from the most concise answer 😁
Just read the quick summary on https://docs.dagger.io and I LOVE the idea of running build pipelines the exact same way between local and toolset 💜
I have 3yo & 9mo girls, I totally understand
Speaking of kids, my 4 yo asked me to speak to his preschool class about what is a software engineer. What should I say? What kind of swag should I leave with them.
Hello,
I started integrating Dagger with Kraken CI.
And I encountered the first issue: how to disable coloring logs from Dagger?
Hey, anyone tried setting up dagger for a project which has more than one dependency for running tests. Like setting up database, cache and queue etc?
I have the same question. I'm also wondering if Dagger could be used as a replacement for Docker Compose for development, so that the developers only need to deal with a single tool
you can set the log format to plain -> dagger do action --log-format plain
Hello, the only non-colored logs we have are with --log-format json. We have no option to disable coloring. If you need it, please make an issue out of it 😇
Hello,
Yes. It's totally possible. If I recall well, this WIP example leverages that: https://github.com/dagger/dagger/tree/main/pkg/universe.dagger.io/examples/changelog.com
Hello, it totally could, as it can also be just a part of your deployment strategy. It's totally up to you. We currently don't support hot reload, but if it's something you need, make an issue and we'll prioritize it. One of our pilot, Particubes, is waiting for this feature too to only use Dagger
We’re still missing 1) long-running commands and 2) port forwarding from client to actions. Once we have that, yes you can use dagger to stand up your dev environment locally. It’s very cool and a testament to the power of buildkit under the hood.
Note: you can already wrap docker compose in a dagger action, it’s not like you need to replace it to integrate it with dagger
Cool, thanks for the answer guys! Yeah, I guess for now I can use Dagger to wrap Docker Compose for now, but it would be cool to be able to handle it all just with Dagger, to reduce the number of moving parts.
Issue submitted: https://github.com/dagger/dagger/issues/2001
Thank you!
Why dagger is not built by dagger but by Makefile?
Some example of Dagger integration in Kraken CI: https://lab.kraken.ci/runs/4393/jobs
Good question 🙂 We actually ported our Makefile to Dagger, see ./ci and will start removing the original Makefile next week
Nice 🙂
Awesome, thank you!
Is there a way to take CLI input from the user?
Soon 🙂 https://github.com/dagger/dagger/issues/1719
cc @turbid tulip
Hey All,Any plans to include Azure devops in CI environment
Hi, i'm new to dagger and pretty interested in it. I have several questions: (1) Do I need to write a CUE file from scratch to build CI pipeline? Are there any example projects and docs for those popular programming language or frameworks: Go/Python/Java/JavaScript/... ? (2) What is counterpart component of Dagger, like GitHub Actions, CircleCI orbs ?
there is an example for github actions on how to integrate a dagger do into a pipeline. the pipeline will be similar for others too https://docs.dagger.io/1201/ci-environment
the documentation is currently a work in progress from what I can tell 😉
you can find a few examples here: https://github.com/dagger/dagger/tree/main/pkg/universe.dagger.io/examples
and I am currently working on a python app and trying to use dagger for testing and packaging it (pytest, docker build and helm chart publishing). the cue file isnt done yet though and I am still learning too 😉
https://github.com/sebastianhutter/mikrotik-dns-operator/blob/main/mikrotik-dns-operator.cue
that's cool! looking forward to it. BTW, I found the learning curve of CUE lang is a little bit steep ... 😂
I start to write a custom task on azure devops as a build task extension. I will try to find out some time to finish and publish it as preview
@bright spire Thanks Much!
Is there a public roadmap for Dagger? I am poking around Github but didn't find one yet.
We are still working on clarifying that sort of thing, but we do have a Milestone here: https://github.com/dagger/dagger/milestone/4
it's steeper than Jsonnet IMO, but easier to write new Cue code/modify existing Cue than Jsonnet IMO
It's definitely a very different way thinking that Jsonnet. I like the compositional model much better. Feels much cleaner to me. Also... schema validation is 
What part do you find “steepest”?
Honestly I find it really really hard to get started when I try to use Cue since their docs feel like they're just missing better usage examples. So to me, I think it's more that jsonnet is quite simple to get started using their docs, and with Cue i'm like searching all over their docs and examples and struggling to get a grasp on it overall.
I'd say, Cue itself isn't terribly hard to learn, but their docs are just not that amazing when your getting started
https://cuelang.org/docs/tutorials/ feels more like a reference than tutorial
https://jsonnet.org/learning/tutorial.html is really good as a tutorial comparatively IMO
A powerful DSL for elegant description of JSON data.
@keen holly we've had that experience too... there is a "what is CUE?" on the dagger docs btw 🙂
cuetorials is good
Improve error messages from “embarrassing” to “bearable” #613
😄
I found "the logic of cue" a good starter, just to get behind the ideas of CUE
https://cuelang.org/docs/concepts/logic/
after that, I agree, the CUE documentation is not the most consistent source to learn.
Hey everybody 👋
I am running my first dagger action in a Github Codespace 🙂 So far so good
I also tried on gitpod, but something is causing the buildkit commands to hang
I pinged Chad at Gitpod to see if he can give us some direction.
👋 Hello. I tried the examples in dagger/dagger and those worked. I tried to make a simple example https://github.com/metcalfc/dagger-hello . It sort of seems to work. @winter linden do you have an example that fails or can we update my example to something that breaks? I can get folks to look at it when CET comes online.
This is what I mean by sort of seems to work. I'm not sure why the commandconn errors are present.
WARN[0007] commandConn.CloseWrite: commandconn: failed to wait: signal: terminated
WARN[0007] commandConn.CloseRead: commandconn: failed to wait: signal: terminated
WARN[0007] commandConn.CloseWrite: commandconn: failed to wait: signal: terminated
[✔] actions.build.container 10.2s
[✔] client.filesystem."./".read 0.6s
[✔] actions.build.container.export 0.2s ```
Hi there! I will try again tomorrow. Did dagger just spin up buildkit automatically or did you have to run it manually?
Didn’t know you were at Gitpod now 🙂
Since Nov'ish.
Hey again. So I was playing over the weekend with some IaC things and ended up creating a Hetzner Cloud instance (comparable to a DO droplet or Linode node) with terraform and configure it with ansible playbook.
this approach already made me kind of crazy and started to become a mess pretty quickly.
is dagger a tool that combines those tasks? (resource managment and configuration of instances)
and good morning from my timezone! 🙂
Hi, what editor and plugins do you use for write CUE file ? I found that VSCode is not very powerful for this
syntax highlighting, parenthesis autocomplete, etc
Hi! Yes you should be able to use Dagger to simplify this. You can run terraform in a Dagger action, and ansible in another. Note: there is also a Pulumi action under development by @vestal creek 🙂 Perhaps ansible can be replaced by a simpler action that just makes a remote ssh commands? Would be an interesting use case to explore.
I kind of want an action that takes another dagger action as input, and produces the Github Actions or Jenkins configuration to run it 😁
yeah ok, that sounds interesting
Hetzner Cloud has a python client or an API in general. How would I start to integrate this? The "docker philosophy" to reach idempotency with just "building it again" is actually a way better approach compared to Ansible IMHO - so, yeah, there might be more easy and better maintainable ways to implement this...
Yes that’s an important part of the design. You specify in one place how to build and run your actions. Instead of jumping between different tools with docker registries in the middle, you just do it all on the fly
👋 Hello, I am new to dagger and tried the examples which worked. Is there an example to use aws sam?
Hello 👋,
We used to have implemented an abstraction like aws sam with dagger https://github.com/grouville/dagger-serverless, but it is with the pre-release version of dagger. Our API changed a lot, and we will need to port it
That sounds like I search. Thank you.
Is there a How To to create Dagger packages?
Like an external one, on github ?
Yes
I wanted to publish this doc today, you can start one, and we'll help you along the way, in 1:1if necessary 😇
Would you be interested in porting it to our new API ? That would be awesome
Are you working on how to publish a package doc?
You can do it if you want, I planned to in ~1 hour, when done with my current doc
Were you just going to port the existing doc?
I wanted to base myself on it, and add some stuff on top
I am interested to learn how to do that.
Is there a ballpark time of day when releases are published? I'm getting ready to record a video about Dagger+Jenkins and saw yesterday that Tuesday is the typical release day and I want to hold off to try out 0.2.5.
🤦♂️ doh thanks.
I should have looked before asking
No prob 🙂
Hey @latent vapor! Been a while. 🙂
I'm assuming alarms are going off since the Auto Release failed?
Thanks, @candid talon . We're taking a look.
Very small world.
Totally! Hope you're doing well!
@candid talon I was going to play with running Dagger in Jenkins as well. Super interested to see what you're working on!
0.2.5 is with @cloud canyon 👋🏻
ETA 20-ish minutes
@candid talon Pressing the button in 5
@candid talon Workflow running now ...
@candid talon And it's released 🙂
yep, got it and running it through my tests. Thanks!
Didn’t get https://github.com/dagger/dagger/pull/2019 in time, what’s missing?
@rain oriole Nothing, just forgot ... merged now
Hi @everyone, now that we have launched, we are switching our focus to incremental improvement. We need your help prioritizing the most important bugs to fix, features to implement, and documentation to write. If you've tried Dagger and have feedback on how we can improve the developer experience, comment and upvote here! https://github.com/dagger/dagger/discussions/2052
haha 100000% cryptic error messages from cue, man, we'd use cue for so much more if the getting real error context didn't require evaling and greping for incomplete, haha
that's probably a better discussion for the cue slack, though, not here
Well, cue's problems are also our problems now 😉
When I was trying to write a plan, it was a lot of trial and error. How does one learn to write plan files? Is that something for the Github discussions?
If it made the experience of using Dagger less good, then it is relevant for the discussion 🙂
I think a lot of people encountered the exact same issue @hasty yarrow
One of the options in the discussion is a VSCode integration that could probably include snippets for common things. Consider typing dagger.#Pl and tab-complete a skeletonized #Plan that has stubs for client: filesystem and client: env with actions: build: stubbed out as some empty action
Certainly that is helpful, but it won't help you with concepts like stages having inputs and outputs, and those inputs determining the ordering of your jobs
in that case, language server when? 😂
I still miss to see a demo or where would fit and dagger brings value. Did I miss some examples directory ?
+1
Hi, if your trying to use dagger to deploy to a server, in dagger terms, is the server a "client" or am I missing something? I'm really new to dagger, and am struggling getting my head around the docs
the client is the machine that's running dagger.
So, do I need dagger running on my server (that I want to deploy to) and my laptop where I want to start the deployment off from?
-
daggeris purely a client tool. You run it from your laptop or CI runner -
buildkitdis the server. You can run it anywhere and connect to it remotely. If no buildkit server can be detected, the client spawns one automatically using docker.
Ahhhhh, I see 🙂 So I need to install buildkit on my server then, thank you. I'm currently watching a YT video, that you're a guest of, but I think I missing some fundamentals 🙂
I have a basic deployment to start with, but then I'd like to migrate us from Azure Pipelines to Dagger, but I need to get my head around it all first
So, I suppose one of the first things that I need to do, is to install buildkit on my server?
If I already have docker.io installed on my Ubuntu 20.04 server, do I still need to install buildkit?
Not install, but we run Buildkit in a container. So you'll have to run this docker container
So you'll just have to run the Buildkit container there
Can someone point me in the direction of a docker-compose file that I can use to run a Buildkit container please?
You have two solutions:
- You install dagger there, and do a
dagger doof a small plan, we ,will autoinstall it - I'll send you the command in ~5 minutes
It’d really help to have more elaborate real world examples. I don’t have the time to spend time exploring it. Examples are very helpful for those who don’t have a lot of time.
Wow, the support here is amazing!
I'm guessing it makes sense to use option 1, as I would only be using Dagger to work with Buildkit anyway?
That's what most people prefer. But Docker for Mac is slower than on linux, so knowing the command might help (some of us work with the remote buildkit). The only real advantage of option 1 is that it will install the proper buildkit version automatically.
The command you need is:
docker run --net=host -d --restart always --name dagger-buildkitd --privileged moby/buildkit:v0.10.0
Can you please add that to the discussion, so that we don't lose track of that info ? 😇
Will do, sure.
Thank you. So, do I just create my plan as normal, and then it will auto download Buildkit as required, or do I need to separate plan, specifically to install Buildkit?
Yes exactly. No need of a separate plan. Running the todoapp example from the doc will also autoinstall it (if you don't want to write yours first) 😇
Brilliant! So, I can create my fist plan which will just pull down a git repository, and then do a docker-compose up, and that will auto install Buildkit as required?
You'll have to do a dagger do <name-of-your-action>, which will do what you said yes
Basically, if you follow this doc: https://docs.dagger.io/1200/local-dev, buildkit will be autoinstalled, but you could also build your own plan
Yep, I did that locally yesterday, and it worked, although the Linux instructions through me a bit with permissions. So, I just need to do the same thing now, on my server, and actually create an "action" that will download my git repo from Azure?
Yes, or just run the command I gave you, and then connect your local dagger CLI to this remote buildkit instance (I still didn't give you that one), and run locally any plan you want. Up to you
This would totally work 😇
Wow! I'm really liking the feel of this 🙂 I'll see what I can get going 🙂
or alternatively, put the plan in your repo and include dagger do <whatever> as part of your existing pipeline. Your pipeline will presumably have a checkout step already, so no need to futz with universe.dagger.io/git
I don't actually have a pipeline yet, for this particular server, as it's going to be a new environment, so am just trying to get it deployed from my laptop.
So, I'm still going to need an "action" on the server side, to actually pull down the git repos? Or will the client (my laptop) have an action to tell the server to download the git repos? Sorry, I'm getting confused 😦
Dagger doesn't handle your build orchestration, so something's gotta tell it when, where, and what to build. Typically this is done in a system like Github Actions or Gitlab CI (or Jenkins or CircleCI or ADO or Concourse or any of a bunch of competitors -- this is a rich space :D).
You could certainly do something different, but if I were setting up CI for a Go app like BoxWallet that appears to be client-only (do you have a backend for BoxWallet? I don't understand the crypto space as well as I perhaps should), I'd make a plan with a handful of actions. Perhaps:
- Build
- Package (to .tar.gz)
Then write a Pipeline in Gitlab CI that runs dagger do build on all commits to any branch and dagger do build package on commits to master. On tags, additionally have Gitlab CI create a Release from the build artifacts that come out of dagger do package.
Sorry, my BoxWallet username, isn't helping here, as it's nothing to do with BoxWallet in this case. So, I have two things that I'm trying to achieve, one is for me personally, and the other is much bigger, for work. For me personally, all I need is for me to be able to run dagger do something (on my laptop) and then it instructs the Dagger running on my server, to pull the latest changes from master, then build with Go, then restart the Go binary, so that it's running the latest version.
My work stuff is more complicated, so I'll work that out when I've got my (more simple?) personal project working. 🙂
I hope that makes sense, and thank you for your time, you're being really helpful 🙂
While I'm sure Dagger could help you here, this sounds like a job for Ansible, not Dagger 🙂
It's also kind of an old-school approach, using your server as your build machine. Modern CI/CD processes would rather see the thing you run on your laptop to be a git push, have some build processes hooked up to your source control, and handle deployment of the build artifact from there.
Understood. ok, is it possible for me to do a Dagger action, on my laptop, that just copies the binary to the server, where the Dagger there takes the new binary, put's it in please, and then restarts it to it's running the latest version?
At work, we have a separate build server that builds out docker images, so I can see Dagger being more used there, I'm just trying to learn the basics on my per project first 🙂
Certainly if you can ssh to your server, Dagger could do so as well and run arbitrary code there 🙂
Great, yes I can do that, but I'm still not understanding, the separation from the client and server bit, sorry. So, I'd like to just run a Dagger command on my laptop, and it do everything that I need on the server, but I'm not sure if I need 2x "plans", one for laptop and one for server, or just the one on my client, that instructs the server what to do?
From what I understood, you don't need 2 plans. I believe only one locally is sufficient
I guess, another question I have, is how I have Buildkit and up and running on my server to "listen" to the commands from my laptop?
No problem 😇 , so dagger is just a CLI, a client that understand your local Cue and translates it to a language that Buildkit understand. Once it is translated, the CLI communicates with its server, the buildkit daemon for the execution part. We don't mind where the server is. Whenever running a command, and without setting the env var specifying that you already have a remote buildkit running, we will spawn a buildkit on your local machine. We do that for convenience
Wow, so I can effectively get my server to do anything, by running Dagger locally on my laptop?
So, is there a simple "plan" that I can create and run, on my server, that would simply make sure that Buildkit was downloaded and running currectly, and listening for my client (laptop) commands?
Totally yes 😇
(Btw, thanks for all your questions, it will be a nice doc add-on)
In order to do that, you'll have to do 2 things:
- Run this command on your server:
docker run --net=host -d --restart always --name dagger-buildkitd --privileged moby/buildkit:v0.10.0 - I'm looking for it 😇 still searching 🤣
Ok found it back:
2. export DOCKER_HOST=ssh://user@IP\n
So, 1 will spawn your buildkit container, the second will connect your docker daemon to the remote one (your server one).
From that moment, the Dagger CLI will be connected to your remote docker client (thus remote buildkit container)
The simple plan would be the todoapp example:https://docs.dagger.io/1200/local-dev. You'll be able to curl it in your server, not locally
It will be a good PoC
If you want, we could 1:1 @faint sleet if you feel you're still missing something or that my explanations are not clear enough 😇
Your explanations are brilliant, I just need to up my knowledge. I'd love to start a 1:1 with you and accept your invitation 🙂
Adding more example/content in our documentation is a recurring feedback, we're working on it 🙂
I'm working on a Go example.
What I used to do in dagger 0.1 (which is not retrocompatible) was
- run go linters
- run go test
- run go build
- create image
- push image to registry
- connect through SSH to my server
- send my local
docker-compose.yamlto the SSH server - do a
docker-compose up --pullon the server - disconnect
So I didn't really need a dagger running on my server, just SSH and a Docker engine running, I guess docker-compose binaries as well.
speaking of SSH -- any plan to have a universe.dagger.io/ssh package? I could imagine lots of use cases for ssh.#Run
We had it in 0.1 if I remember right. And yes, this is a very composable system that would fit perfectly in 0.2 I think
Yes, thank you, that's great! After a 1:1 with @swift inlet that's what I've decided to do. Do you have any cue files that could assist me?
@swift inlet thank you so much for your time 🙂 It was really valuable 🙂
You can also create your compose.yaml in an #FS, mount it in a cli.#Run, and point to your remote daemon via ssh and run the docker deploy/up command from dagger (https://docs.dagger.io/1217/docker-cli-run/#remote-daemon-via-ssh). That's what I'm doing.
oh nice, cli already integrate ssh, that is cool
Not implemented yet is if you have a passphrase in your private ssh key.
Hey, I'm curious if anbody here has created a CI/CD pipline for a Bazel monorepo using Dagger? If so, I'm curious how it went!
I would be very interested to see how we can integrated with bazel as well, we're not there yet. It's not really a CI per se, but I don't know if it could be added in this thread: https://github.com/dagger/dagger/discussions/1677
I'm also curious how deep these CI/CD platform integration might potentially go? E.g. if I declare my CI pipeline in dagger and it has a bunch of parallel steps, might Dagger run each parallel step on different workers if the underlying CI platform allows it? Or is that out of scope for Dagger?
It actually work already because we rely on buildkit. So if you have a buildkit cluster, each parallel step would execute on a separate worker.
But this buildkit cluster needs to be contactable from the CI env, I guess.
Yeah, so I guess it depends on if the CI platform decides to create a native Dagger integration?
We're talking about that in the #dev-audio if you want to join :p
but the idea is : No, not necessarily. You could have a CI that can access a remote buildkit cluster that you host however you want. In your CI, at the dagger step, you need to setup a env var : BUILDKIT_HOST and point to the host of your buildkit cluster
you can "mention" vocal chats the following way if you ever want to (works with textual chats too): <#channel-id> which gives: #911305510882513037
😍
lol, I'm clearly a discord noob
<#dev-audio>
That's kinda hidden stuff
#<dev-audio>
you need the id, so you need dev options enabled and a right click on the channel
last try: #911305510882513037
yay
Thanks @vocal lotus
no problem
Hi, was going to ask if the dev-audio's happen each day?
Hi, we will try to be available to help the community on dev-audio more often. Maybe in a more specific manner: you come with an issue in your plan and we live debug with you. But @mystic mantle will be available this afternoon if you want some live peer review
Nice, ok, I'm still kicking the tyres at the moment, so I don't have many useful questions, just newbie ones 🙂
Is it best to start with dagger project init for a new client project?
And would you do that inside your repository, so that it all get's added?
and, does dagger project init create a default "plan"?
and, what would be a suggested name and location for the cue file that contains the "plan"?
Yes, you need to do a dagger project init, so it bootstraps the cue required files
Yes, at the root of your repo would be the easiest, otherwise, you have to point to the plan .cue file with -p
Not yet, if it's bothering people, maybe we'll add it. I thought there was an issue tracking that, but I can't seem to find it
I would say that maybe plan.cue could be sensible, but I'm also a newbie for now 🙂
So, I run dagger project init in the root of my project, and can then create a file called maybe plan.cue?
That's really kind of you, but I don't want to waste any of your time. I'm literally coding it as I get answers for my questions 🙂
Well, I'm here to help
I'll still go live stream my Go use case in #911305510882513037 anyway 🙂
I'll join in a minute, I'm just working on our production system 🙂
(had to leave, I have 2 "demo" call on my own to do now 😓 )
FYI @turbid tulip and I are reviewing a very cool feature he's working on. If anyone wants to follow the stream on #dev-audio 🙂
Neat!
Hey all. I'm trying to figure out how to contextualize dagger. I have this notion of an intent based pipeline (https://github.com/cdfoundation/sig-interoperability/discussions/91) wherein we say "build things kinda like this, then deploy kinda like this", but leave the specifics up to the backing implementation. Is that conceptually what dagger does in y'all's opinion?
@vagrant tiger Dagger gives you a platform to create your own "intent-based" DSL, and expose it to end users.
Then in the backend expand it into a precise implementation, and run it
So we don't define such a DSL, or attempt to standardize it, but give each team the tools to create their own. Something that many are trying to do already, but at great engineering cost
Do you have a repository with an example that a developer might write and what it turns into on the other side?
aha. this points me to what I was looking for. Thanks, solomon! https://docs.dagger.io/1211/go-docker-swarm/
Since people were wishing for an Azure Devops implementation, https://github.com/joachim-isaksson/dagger-for-azure-devops seems to be working now after realizing rmdirSync doesn't exist on Node 10 that devops uses (oops) It's rather heavily based on the github action implementation and I published an internal package to my devops and the build/cleanup runs fine.
Since I'm just testing dagger for possible later use, I probably should not be publishing and maintain the package. Anyone interested is welcome to just copy the code and run with it, otherwise it may at least inspire someone when getting started writing a possibly more full featured implementation.
...and now off to work.
That’s great! Thank you very much Joachim.
Maybe I should add after quickly testing, it runs on ubuntu-latest build machines, something about a manifest fails if using windows-latest, guessing it pulls the linux image into a windows docker or something. Not quite sure what the behavior should be when run on a windows machine since I don't have one to test on locally atm. But may look at it later this week.
Hi guys, i'm having trouble with multi-repo project.
How do you guys advice on using dagger for multi-repo project. For example need to produce few artifacts in 3 different repo's and merge those artifacts together. Do i need a 4th repo just to let dagger combine the artifacts?
will definitely test it out as i'll start an Azure DevOps project 🙂
Yes, you can host your package registry, This package registry will host all re use able package(Consider them as Docker base file). Now Each repo can have it's own dagger plan that's is mostly common if you abstracted it correctly.
The video I did for Dagger + Jenkins just went live. I wanted to ask if it was ok to post a link to the YoutTube video before just posting it since I'm new to the community.
@winter linden ⬆️
Yes of course, as long as it's relevant to the Dagger community and they won't experience it as spam, you are free to post. A video about Dagger + Jenkins is definitely not spam 🙂 Thanks for checking!
@bright spire ☝️
Oh! I've almost done the same things 🙂 https://github.com/spike008t/dagger-for-azuredevops
I'm waiting from Microsoft to have a free pool agent for this open source project in order to have integrated build + tests under devops
And publish it on the market
how about merging your both efforts then ? 😄 so you could both improve and not rebuild the same stuff each time 🙂 just saying of course 🙂
@candid talon excited to see it!
Oh, I found it. Awesome content @candid talon ! 😻
https://www.youtube.com/watch?v=MDbfRs54b-M
https://github.com/darinpope/jenkins-example-dagger/tree/00-start-here
https://github.com/darinpope/jenkins-example-dagger/tree/01-hello-world
https://github.com/darinpope/jenkins-example-dagger/tree/02-basic-docker
I'd love to use this as the basis for our Jenkins + Dagger docs content.
Super pumped to be here! 🙂
Wonder how best to contribute, should I check out issues?
👋 working on a "tekton" package for dagger… something like
package tekton
import (
"dagger.io/dagger"
"universe.dagger.io/x/vincent@sbr.pm/tekton"
)
dagger.#Plan & {
actions: test: task: {
// Test: inline task tekton.#Task
inline: {
task: tekton.#Task & {
definition: contents: #"""
apiVersion: tekton.dev/v1beta1
kind: Task
metadata:
name: git-clone
spec:
steps:
- name: clone
image: gcr.io/tekton-releases/github.com/tektoncd/pipeline/cmd/git-init:v0.21.0
command: ["/ko-app/git-init"]
args: ["-url=https://github.com/vdemeester/buildkit-tekton", "-revision=main", "-path=/workspace/foo"]
- name: ls
image: bash:latest
command: ["ls", "-l"]
args: ["/", "/workspace", "/workspace/foo"]
"""#
}
}
}
}
would rune the "git init" clone and then list the content.
11:40AM INF actions.test.task.inline.task._dag."0"._run._exec | #3 8.769 {"level":"info","ts":1649324452.0669842,"caller":"git/git.go:169","msg":"Successfully cloned https://github.com/vdemeester/buildkit-tekton @ a17d0023784720d746c679ade01ba3963d859e37 (grafted, HEAD, origin/main) in path /workspace/foo"}
11:40AM INF actions.test.task.inline.task._dag."0"._run._exec | #3 8.785 {"level":"info","ts":1649324452.0828714,"caller":"git/git.go:207","msg":"Successfully initialized and updated submodules in path /workspace/foo"}
(currenty in a very very wip branch in my fork)
(and it support tekton oci bundle as well as "inlined" definition)
@loud glade That's awesome! Let me know if you need any help
Hi all, we are working on adding contents to the documentation, here are two new pages, with more coming:
- An overview of Dagger Actions: what they're for, and how they work. https://docs.dagger.io/1221/action
- A reference of Core Actions: https://docs.dagger.io/1222/core-actions-reference
Actions are the basic building block of the Dagger platform.
Core Actions are primitives implemented by the Dagger Engine itself. They can be combined into higher-level composite actions. Their definitions can be imported in the dagger.io/dagger/core package.
As a style note: if the docs on dagger.#Plan is going to be named "It all starts with a plan," it should be the first entry in the list 🙂
Yeah that was the case until yesterday... We might have to change the title then. The reality is... It actually all starts with an action 🙂
👋 hello everyone!
a newbie question, what is the supposed way to get the "output" of deployment, such as url from netlify? in last year version, dagger supported "query", i cannot find it in latest doc. thanks!
👋 Welcome @long moon !
For now use something like dagger do deploy --log-format plain
There are issues for improving the DX around inputs and outputs as well. Coming soon!
https://github.com/dagger/dagger/issues/1351
https://github.com/dagger/dagger/issues/1806
I find the pre-europa outputs very useful, just wish you could control which outputs to show. Europa is well positioned for this, maybe something like: engine.#Plan & { actions: { build: pu...
thanks for info. yes it will be great to pinpoint the outputs. look forward to it.
another thing that you can do is use the client:filesystem write capability to write the outputs into files in your client FS in case you need to do some automation without having to grep into the output of --log-format plain. In the case of netlify, the Dagger action is already exporting those values. You can check it out here: https://github.com/dagger/dagger/blob/main/pkg/universe.dagger.io/netlify/netlify.cue#L95-L99
What I'm doing in the meantime is what @sharp marsh just suggested.
import (
"encoding/json"
...
)
dagger.#Plan & {
client: filesystem: "output.json": write: contents: json.Marshal({
url: actions.deploy.url,
deployUrl: actions.deploy.deployUrl,
logsUrl: actions.deploy.logsUrl,
})
actions: {
deploy: { ... }
}
}
You can also output in yaml, it's just json allows usage with jq. Or even a simple file with:
client: filesystem: "url.log": write: contents: actions.deploy.url
I'll work on a quick doc guide today until we have a more robust solution
That's coming up soon, outputing to the console has been prioritized due to popular demand 🙂
Is that planned to be more like logging or more like terraform structured outputs?
Not sure about terraform, but I think both, if I understand you.
Default can be a simple table with values at the end of run. But you can ask to output in json so you can pipe to jq.
Terraform "outputs" are like reverse variables. Just a key mapped to the value of any given object path
Out of curiosity, how do you consume terraform outputs?
Straight from stdout? Or write to a json file first?
There are a few ways. Stdout is default. Good for just a quick summary. You can terraform output <name> to get a specific value or terraform output -json to get the json string. You can also use the remote state provider to access the output from a different terraform configuration.
But having a named output lets you change where the value comes from without affecting the "api".
Thanks for the suggestions, @rain oriole @sharp marsh ; could i also use another action?:
dagger.#Plan & {
actions: {
deploy: {...}
query: docker.#Run {
scripts: '''
echo "url: \(deploy.url)"
'''
then we can just do: "dagger do query" ?
Sure, but you'll need --log-format plain. It'll output to stderr next to the rest of the logs, but may be enough for you 🙂
got it. thanks🙏
Hi, just wanted to say a quick thank you for all of the support I got today 🙂
I thought it was about time I posted something, without actually asking a question
I absolutely love that dagger gives me control to do basically anything on my dockerfile wishlist, just sans dockerfile.
And no more temporarily copying things around with make.
Is there a way to build a docker image and transfer it directly to a server and run it there? Effectively, bypassing the need to upload it to a registry?
Using cli.#Load, you can save a dagger image (docker.#Image) into a local or remote engine.
Wow, that's amazing!
Wow.... @stoic knot 🤯 https://github.com/hofstadter-io/harmony-cue
hi Dagger team!
new in here and in discord in general
but happy to be here
thanks @heavy gazelle for the invite!
Welcome @frail mulch 🙂
@winter linden hi there!
I might be asking for some help..
I was discussing with @heavy gazelle on how to migrate some github actions to use dagger to build some projects
Happy to help any time
@winter linden thanks!
Is it wrong that I'm waking up thinking of all the cool things I'm going to be able to do with Dagger? 😜
If you're wrong, I don't want to be right! 🌞 🐓 
@winter linden Harmony is in a good place now. Let me know if you'd like to do something similar for a dagger/harmony repo. Happy to help but also curious how easy it is to do with the current docs / examples
Thanks @stoic knot ! It's really impressive stuff. I'm wondering if we could use it to orchestrate testing universe packages across multiple versions of dagger
hello and good day to everyone. I want to ask a question, is it possible for me to use dagger to push docker image to GitLab container registry?
I haven't used the Gitlab container registry but if you can auth to it with docker login then Dagger can push to it with docker.#Push
It is possible, Gitlab also need username & PAT. Check here https://docs.gitlab.com/ee/user/packages/container_registry/#authenticate-with-the-container-registry
Thank you for the update, i will update my code and test it out
i'll have a read on this, thank you for the link
Hey guys - any tips or thoughts on working with cue in vscode? I would love an autocompletion/intellicode plugin
There's a "Cuelang" syntax highlighter, at least.
Found that already :)
There's also https://marketplace.visualstudio.com/items?itemName=jallen7usa.vscode-cue-fmt but that's just a formatter
Thanks :)
Looks like most requested (you can vote): https://github.com/dagger/dagger/discussions/2052?sort=top#discussioncomment-2512196. For now, just syntax highlighting and formatting.
Hah! I’ve only just discovered that dagger do foo bar baz, space separated:
- runs my
actions.foo.bar.bazaction, but … - makes sure to run ONLY the prereqs for that action that are essential, through the DAG!
That is a fantastic feature 🙂
Are there Issues logged about:
- making the nested/targeted action run more visible as a feature?
- exposing that the comment closest to each actions. subkey is printed in the
dagger do [--help]output - noting that
dagger do foo bar baz --helpshows the commands, and optional comment-based-description, of each of the sub-actions underneathactions.foo.bar.baz?
If not, I’ll file them! This is an absolutely killer feature 😁
Yes please! And I agree that feature turned out great.
Was I being a bit short-sighted, or is this feature rather well hidden right now?
Hey~ were there any examples (pre Europa) for Kubernetes where the manifests were written in CUE? I have a vague memory of seeing something like that in Dagger-space...
It's not just that feature, our docs have very little content. We are working on fixing that 🙂 You pointing out which features were "well hidden" is very helpful.
https://docs.dagger.io/1007/kubernetes/#cue-kubernetes-manifest
NOTE: this is a documentation for Dagger 0.1 and does not work on the latest version.
This tutorial illustrates how to use Dagger to build, push and deploy Docker images to Kubernetes.
That's the one! Thanks : ☺️
Definitiely @winter linden, we could even set it up so it's usable against local, uncommitted code.
especially interesting as 3rd parties add to the universe & ecosystem
We have a lot of inbound contributions to universe, so offering adequate testing infrastructure is important. It will help us keep a high quality bar.
Definitely! I noticed when making contributions to universe that running the test suite can be hard because it has a number of dependencies that I don't have and wouldn't otherwise need (I had npm, but if I didn't then that, yarn, sops, etc...)
Is it possible to have a dagger project update happen automatically, after a dagger project init with the latter, also creating us a default dagger.cue file, with a dagger import in the top?
Also, we could perhaps have a small template, with comments, containing the different sections required?
I think this would be quite useful for new users, as I thinking that they would expect some kind of editable file after the init command?
Hi @faint sleet,
It's currently in progress: https://github.com/dagger/dagger/pull/2095 😇
@winter linden I haven't used discord before.. but I would love to get some help to get this github action migrated to use dagger: https://github.com/salaboy/fmtok8s-api-gateway/blob/main/.github/workflows/ci_workflow.yml
Hi @frail mulch,
It's totally possible ! How could we help you ? 😇 Where would you start ?
@swift inlet sorry for the delay
so basically it will be great to have the same steps but using dagger.. these examples will go in this book: http://mng.bz/jjKP so I want to make sure to show how dagger can help to run those actions also locally
fmtok8s-api-gateway
When naming actions, is there a good naming convention to follow? e.g. If you want to separate words? deploy-to-production or deploy_to_production or deployToProduction?
Please follow these guidelines when contributing CUE packages to keep consistency,
Anyone here thought about SO tags? Looks like [dagger] is already in use. https://stackoverflow.com/search?q=[dagger]&searchOn=3
Maybe daggerio or dagger_io like the twitter account.
That's on it's way 🎉 (https://github.com/dagger/dagger/pull/2095) cc @winter linden still need your 👀 here.
sorry for the non-response. I had an emergency come up right after I posted and I'm just getting back in the groove.
Np, @candid talon . Hope all's well. We put up an initial example with Jenkins (with much inspiration from you),
https://docs.dagger.io/1201/ci-environment
but I've learned that our best practice is to commit the cue.mod to git and thus avoid some dagger project init and dagger project update steps. So I'll be making another PR soon (to follow this one: https://github.com/dagger/dagger/pull/2102).
I'm setting up a Jenkins controller with dagger on it right now to play around with. Wondering about things like a shared buildkit cache across Jenkins agents, etc.
I already ran into issues with building dagger on the Jenkins image on M1 Mac (arm64) due to golang, so I'm building on my Windows machine (amd64).
yeah, I wasn't sure about cue.mod , so I went a little more aggressive since I couldn't find any docs saying what to do with it.
Yep, totally makes sense! We're figuring out the best practices and documenting them in real time 😄
See bottom of this guide for current wisdom: https://docs.dagger.io/1225/pushing-plan-dependencies/
After completing your plan and setting up your GHA or Gitlab CI, you'll realize that a lot of Cue files are present in the cue.mod/pkg directory. These are the dependencies required by Dagger to run your actions :
@candid talon did you use a Freestyle or a Pipeline project for your vids?
thinking through the shared buildkit cache, I would have to look at what that file structure looks like. There are ways, but they are typically not very pretty.
but this might give you some inspiration https://www.jenkins.io/doc/book/pipeline/docker/#caching-data-for-containers
@candid talon @slender star re caching: there's a couple of options to go around:
-
Export/Import cache from dagger: it supports the same
--cache-to/--cache-fromflags asbuildx(e.g. export cache to a container registry) -
Or, lower level, looking at the doc shared by @candid talon, we could potentially start a buildkit daemon with a host volume to persist the cache
dagger already starts its own daemon with a persistent volume upon the first dagger do (a container named dagger-buildkitd with a dagger-buildkitd volume).
I don't know much about Jenkins, unsure what happens when you run a container, do they stay around with their volumes? If so caching should already work per-agent (not shared)
Yes, the dagger-buildkitd container hangs around on my single node Jenkins controller with docker and dagger on it. So I expect each agent to have its own dagger-buildkitd container. Would be great to get them pulling from a shared cache, for sure.
Hi @everyone, just got to know about
dagger, pretty interesting project. I am a newbie learning DevOps and looking for some non-code contributions 🫂 that I could do with
dagger
First contribution would to not ping the entire server lmao
mate try not to do an at-everyone please 🙂
They really need to fix the permissions 
Maybe this should be disabled for default users
Yeh cheers 🤗
exactly lol
Good morning though
Morning!
Please don’t ping everyone. It’s rude. Perhaps learning how to communicate would be the first step before anything else.
Can i paste this in my office slack where this one guy keeps tagging channel for whatever stuff he does :/
your admin should do his job and prevent this 😄
Checking who’s the admin. Finds out I’m one of them. Should do my job now:D
😄
Sorry everyone, we will fix permissions to avoid this in the future.
Also: please don't be harsh on your fellow daggernaut who made this mistake, not everyone is a discord expert. It's really our fault for not putting a safety on this.
UPDATE: I have fixed the permission.
That's what we pay you for, yeah.
🪙
I DMed him to tell him this. Best to give the benefit of the doubt.
I run a GCP Discord server btw and what I've found helped was a channel where people read instructions, including netiquette. It even had a GIF on how to unselect the ping when you reply.
If you need any mod for this Discord to manage this amount of users you should maybe start an application. In this case you are more free to focus on other stuff 😊
I am really sorry for that disturbance. I don't really know how things work. This wont happen again. Sorry again 🙏
Hi, is it possible to get the ip address of a running container on a remote server, when running a plan from a client?
I hope I asked that correctly 🙂
You can use cli.#Run from universe.dagger.io/docker/cli to docker inspect it.
Thanks
Is there anyway of extracting just the ip address?
https://stackoverflow.com/a/20686101/1050536 shows an example of just getting an IP from inspect
Nice! Thank you
@faint sleet note that Docker cannot guarantee that you can reach that IP address from your client machine. It can be a useful hack but important to realize it’s just that: a hack
Understood. It was mainly for running a command directly on the server, via Dagger, to import a database into the running container 🙂
If you wanted to perform a docker-compose up -d on a remote machine, could that be done via the universe.dagger.io/docker/cli or would it have to be done via SSH?
It can be done by cli, you just have to had docker-compose binary to the image.
Ah, I see, because docker-compose will not actually be running on the host server, because its running inside Dagger/BuildKit?
Yes. Just connected to a remote docker engine, just like the docker binary.
I see. Thank you. Every day it's becoming a bit clearer to me 🙂 I now have many of our SSL certificate deployments running on Dagger 🙂
Sorry, I can't work out how to do that? I've got another example, where I run scp, but that's via a script within #SSH?
There's a universe.dagger.io/docker/cli package that allows you to run docker commands against a local or remote docker engine. Here's a few examples.
Yep, I've just read that. So, does that mean the command: name: "info" line would read command: name: "docker-compose -f docker-compose-file.yml up -d" ?
No, it should be:
command: {
name: "docker-compose"
flags: "-f": "docker-compose-file.yml"
args: ["up", "-d"]
}
But you need to override input with an image that adds docker-compose. You can use docker.#Build with cli.#Image.
Ah, I think I understand. Like this:``` _baseImage: alpine.#Build & {
packages: {
bash: {}
"docker-compose": {}
"openssh-client": {}
}
}
Yes, we'll add a compose.#Run sometime 🙂
So, would that work for any command? I'm currently using script: contents to issue commands? e.g. scp and mkdir?
cli.#Run is a convenience that sets DOCKER_HOST for you. While you can issue any command (from docker.#Run, not bash.#Run, i.e., no script field), maybe that loses it's usefulness 🙂
Sorry, that's gone over my head. I think I'm going to have to do more reading 🙂
I'm also presuming I can't have an ENV in this line:? flags: "-f": "${DEST_DIR}/docker-compose.dev.yml"
You can interpolate it in CUE though: flags: "-f": "\(destDir)/docker-compose.dev.yml".
If you have requests for new packages in Universe, remember to request them here: https://github.com/dagger/dagger/discussions/1922
So, how would I get my env variable ${DEST_DIR} into (destDir) for CUE?
Does this help? https://docs.dagger.io/1203/client#environment-variables
dagger.#Plan has a client field that allows interaction with the local machine where the dagger command line client is run. You can:
I'm not sure. I'll read this again. Thank you. I'm using environment variables in my plan now, and for running a script, and that works fine, it was just trying to get it into that particular part that didn't seem to work.
just replace destDir with client.env.WHATEVER 🙂
Oh, I see. It's as simple as that? 🙂 Thanks, I'll give it a go
Does this look correct(ish)?
command: {
name: "docker-compose"
flags: "-f": client.env.DEST_DIR + "/docker-compose.dev.yml"
args: ["up", "-d"]
}
For the flags: line?
That should work, though I'd lean toward preferring interpolation to string addition. flags: "-f": "\(client.env.DEST_DIR)/docker-compose.dev.yml" reads better to me than the string concatenation you're doing.
They should be equivalent in practice, though.
Nice! Thank you, just wanted to check and not get into bad habits 🙂
One of the projects I'm porting to Dagger uses ESLint in its CI, which throws the following error:
#21 148.0 ESLint: 7.4.0 #21 148.0 ESLint couldn't find the config "react-app" to extend from. Please check that the name of the config is correct.
#21 148.0 The config "react-app" was referenced from the config file in "/src/cue.mod/pkg/universe.dagger.io/examples/todoapp/package.json".
Ignoring cue.mod/ isn't going to work for this project though as we also want to have Kubernetes manifests written in CUE that will rely on k8s definitions in cue.mod/gen. Any suggestions for the best way to work around this?
Wondering something about Dagger's cache model: because of the way the registry is used as a shared cache between multiple machines, could I, in theory, distribute the work of a really large build across cloud execution nodes just by calling different dagger do targets on different nodes? Obviously you lose some of the simplicity if you do it this way, but if that's workable as an escape hatch in an extreme situation it'd definitely make me feel better about using Dagger on a really large project.
Yes 👍
We have work to do on packaging and productizing it, but the underlying tech (namely buildkit) supports it. You could rig such a setup yourself today.
@winter linden that's great to hear! My team has an eng offsite/hackathon coming up, and I will probably do a Dagger POC for it. Really stoked.
👍👍
👋 Listened to the ShipIt podcast and got some ideas, some wanted to run them by here and see if any of my use cases would not be ideal for Dagger.
-
We have CI bash scripts to automate a bunch of stuff, I basically wrote functions in bash and then execute them in GitLab CI, not very portable and now we plan to move to GitHub Actions. Was planning to eventually abstract them into a Go CLI program but Dagger seems like a good alternative for this? Yes/No?
-
If I wanted to have abstracted and versioned scripts across all 100 repos (exaggeration) in my company, does that mean maintaining 100 cue files? I assume I can package this up and then have to update dependent versions in my 100 repos. We currently have this problem.
-
We have a custom inhouse Go CLI tool that we use to abstract the build, deploy and other developer tooling like secrets. Could Dagger replace this or there would likely be a world where our custom CLI tool calls Dagger. We are turning this CLI tool into a API webservices to do all kinds of things from run trigger the build, deploy process. We currently writing our pipelines in Go and figuring out how to do all of this in Go. Dagger sounds like a better abstraction from modifying files, to doing a Git commit.
The Golang webservice can abstract the CLI and HTTP but still run Dagger under the hood?
-
Yes 🙂
-
That should not be a problem
-
You can certainly wrap dagger into your own CLI or API, although there are pitfalls to be careful of, to avoid fragmentation
What kind of pitfalls? I dont think it makes sense to give Dagger to all developers and require them to learn how to extend it. They are already configuring YAML config and Terraform, we want to simplify this process and bring it up a level.
- We have a lot of one-off scripts for random stuff. Thinking of where we can write these and run them aside from bash. Dagger sounds like a place to put them especially if they form a DAG. I suppose I could also use it to run Terraform then take that output and apply it to a Kubernetes deployment.
Absolutely, you shouldn't have to force every developer to learn CUE and the internals of Dagger. Whatever configuration format they already use (whether it's for an off-the-shelf tool, or your own DSL) they should be able to continue using that.
The pitfalls are in how you allow them to do that. Typical things to look out for:
- If your tool generates cue files for Dagger to run, you're almost certainly wasting effort
- If you don't have full interop with the entire Dagger ecosystem - for example if your plan cannot incorporate any Dagger action without some modifications specific to your tool - then you are fragmenting yourself out of the ecosystem and missing out on the value of Dagger's "lego" system
These pitfalls can be avoided, but in my experience, almost 100% of wrapper tools end up failing to do so.
Most of the times, it's better to:
- Write Dagger plans that load your developer's existing configuration files as inputs
- Give developers the
daggertool and show them how to use your plan withdagger do - Let them continue to write the same files they're used to - no CUE or Dagger internal knowledge required
Your use case might be the exception, but again - I've seen many teams believe they were the exception, only to realize later that they had fallen in the pit 🙂
Thanks, I'll think about this, I definitely dont think were an exception. Every company usually builds the same type of internal tool using whatever theyve got.
I'm thinking of using it to run DAGs that require centralized admin credentials. Maybe thats behind an API. It seems I can either use dagger in the background to run my logic instead of having to build those pipelines myself in a specific language or publish those APIs as a Dagger package and have each repo use them.
I'll experiment a bit and see what works.
Current usecase for a workflow might be:
- Clone a GitHub Repo
- Modify some files and submit a commit
- Create an AWS ECR Repo
- Push some ArgoCD configuration to a central GitOps repo.
Hi, I have a question. Do you have a plan to support to interactive actions (like workflow)? e.g. Manual approvals or plan-before-apply in dagger action.
Like this? https://github.com/dagger/dagger/issues/1660
Thanks! Yes. sometime, confirmation prompt is also guardrail for operation... humm. :-}
hi folks! what is your take on the idea of either:
a) the user running a tool to covert cue to a pipeline provider format (e.g. github workflow)
b) having a cue file introspect itself (if possible) in order to generate and commit a pipeline provider formatted pipeline (e.g. github workflow)
is this crazy talk? contrary to the vision of dagger?
in case the goal was unclear, it is about having dagger as the source but benefiting from the features of the pipeline provider such as the visualisation of the DAG in github actions. At the moment, as far as I am aware, you can't represent the visualisation of the dagger DAG in the pipeline providers native visualisation. You have to manually wrap it as one step (and loose the visualisation) or wrap each individual action and relationship so it's visualised in the fullness of the DAG.
Our priority would be more to give visualization into the Dagger DAG instead
got it. and, fair.
Write Dagger plans that load your developer's existing configuration files as inputs
Are there any existing examples of this?
hi there! would anyone have an example on dagger for a python project?
Hey Gabriel! Coincidentally one of guides covers a basic python example. I think this is a good starting point to get introduced into Dagger https://docs.dagger.io/1205/container-images
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.
that's great! thank you very much!
Hey @smoky shard. For example, if developers are already used to writing Dockerfiles, you don't need to immediately go and tell them "now write Dagger actions". Instead, you can leverage on already existing actions (or create new ones) so you don't force them to switch. The idea about Dagger is to meet devs where they are. You have an example about the Dockerfile scenario I referred here: https://docs.dagger.io/1205/container-images
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.
Ah I see so it’s more about reusing existing Dockerfiles or helm etc and plugging that into the existing actions. I was thinking there might be examples of taking a GitHub workflow or Jenkinsfile and turning that into a plan
Using what devs already have
Hi
Does dagger have to perform some kind of search to locate usable cache layers on a remote registry? I'm trying to wrap my head around how this all works -- I've noticed that when building images with buildkit through docker, I have to specify which tags in the remote registry I want to consider as cache sources, but it seems like dagger doesn't do that.
I assumed that if it were possible to efficiently find cache across an entire registry, that would be the default behavior, and we wouldn't bother with --cache-from. But my impression of dagger is that it can treat the remote registry the way docker treats local cache -- searching through the entire thing to see if there's a layer anywhere that matches the current dockerfile and context
search usable cache
Hi, what do you see instead?
Hi. I find dagger just store universe.dagger.io cue files into binary, and extract when project init. https://github.com/dagger/dagger/blob/main/pkg/pkg.go.
Could we make universe.dagger.io/* getable ?
Here a proposal for package management https://github.com/cue-lang/cue/issues/851.
it just same as go mod did.
I created a spike version with it https://github.com/octohelm/cuemod
Anyone interest this. We may bring this feature mod into dagger
Hi Morlay, yes embedding the files in the binary was a temporary solution, we want to fetch the packages on “init”. We made it so we can easily switch to the cue packages when available, we don’t want to implement a separate package system.
I see.
Could we make https://universe.dagger.io/*?cue-get=1 and https://dagger.io/*?cue-get=1 work like cue's proposal said.
From now?
I guess so, I would suggest this in a github issue, I think there is one related to packages
Are you involved in the cue packages spec?
Nope. I implemented the tool https://github.com/octohelm/cuemod with go mod before the proposal for my custom usage. (hacks here: https://github.com/octohelm/cuemod/blob/main/pkg/modutil/util.go)
The proposal is from Paul
Here are some context https://github.com/cuelang/cue/discussions/730#discussioncomment-501147
It totally same as go mod but just rename go* => cue*.
Paul said it need to refactor codes for go mod to make it could reusable.
nice work, I pinged you on the github issue I had in mind to improve the packaging support. Using the CUE upstream implementation of packages is the preferred route (when it exists), but cuemod could be a stopgap. Do you plan to upstream your work into CUE?
I hope so. But I don't know plans from CUE team. The proposal here for so long. https://github.com/cue-lang/cue/issues/851
For dagger, we could easy to enable this feature. without any changes from cue. https://github.com/octohelm/cuemod/blob/main/pkg/cuemod/build.go#L31-L68
For this? https://github.com/dagger/dagger/issues/853 (Why closed? haven't see the implements)
No, I meant this one: https://github.com/dagger/dagger/issues/2163 (it superseded #853)
Got it.
hi, what is the way to create custom package like universe.dagger.io and then use it on plan ? I have tested to create github repo with folders that contain package like universe.dagger.io, but I doesn't found the way to get it with dagger project update
We're working on documentation for that. You can publish your packages in a public or private repository of yours, and then install with dagger project update <repo url>.
There's a bit more details to it, we can help until the docs are available.
@rain oriole thx, it's work 😉
and there are a way to display output of bash.#Run even when is success on stdout ?
Yes, with the plain logger: --log-format=plain. Not if it's cached though, you'd have to skip cache.
Here an example to work with my tool for package management.
https://github.com/dagger/dagger/issues/2163#issuecomment-1104740485
Private repo could use same configuration of go, like GOPROXY GOPRIVATE
Hello Dagger folks! I am an engineer at GitHub and do a ton of DevOpsy things on the side. I found this project from a Medium post and I find this project fascinating. I personally have found myself in YAML hell many times before writing GitLab CI/CD pipelines and even GitHub Actions templates. I hope to use Dagger in my next personal project and learn more about it 🙂
Welcome, @pliant fable! 👋
Hey, does someone has a java example?
Do you want to do something specific with java? Just generally compiling a java program and output an executable or similar?
Do you want to do something specific
hi, I have a plan with multiple actions that use the same input variable env. And this variable is provided by user with client.env (http_proxy, https_proxy, no_proxy). There are a way to pass client.env on each action without to recreate hash on each action ?
Hi,
Interactions with the client are scoped inside the client key in the plan for security purposes. Any action interacting with the client needs to reference this key to make sure the person knows that the action interacts with the host
so the righ way is done by ?
dagger.#Plan & {
client: {
env: {
http_proxy: string | dagger.#Secret
https_proxy: string | dagger.#Secret
no_proxy: string
}
}
actions: {
_env: {
http_proxy: client.env.http_proxy
https_proxy: client.env.https_proxy
no_proxy: client.env.https_proxy
}
validate: helm.#Validate & {
input: _installTools.output
directory: client.filesystem."./".read.contents
env: _env
}
}
}
where I pass env: _env on each block action
Can you please share your helm.#Validate definition ? It seems correct
It seems correct
Is there a public roadmap available at all? For example, dagger is in beta, is that correct? If so, when are you looking to get to a 1.0 release etc.?
i need to replace
env: {
env
}
by
"env": {
env
}
now it's work fine, but I doesn't know why the really diffrence
Is there some sort of catalogue of actions that not yet part of universe or core? If not, is it planned?
Here, you created a cyclic reference. Cue doesn't know which env you where talking about. By specifying "env", you're telling Cue: this is the env key of my definition
Not at the moment, and you're right. It's planned 😇
and to finish there are a way to append on string to generate cmd with multiple parameters ? Or maybee append on string list anf after convert to string. I doesn't yet found the right syntaxe to do that
You can use + built-in or strings and list packages from CUElang 🙂
Example: https://cuelang.org/play/?id=4Mkj18ILvdN#cue@export@cue
References:
https://cuelang.org/docs/references/spec/#string-operators
https://pkg.go.dev/cuelang.org/go@v0.4.3/pkg/strings
https://pkg.go.dev/cuelang.org/go@v0.4.3/pkg/list
The CUE Language Specification Introduction This is a reference manual for the CUE data constraint language. CUE, pronounced cue or Q, is a general-purpose and strongly typed constraint-based language. It can be used for data templating, data validation, code generation, scripting, and many other applications involving structured data. The CUE t...
Hi everyone, I just learned the existence of the dagger.io yesterday and found a super interesting tool. I was looking for something to get rid of our makefile hell. Great work 👏
Also just created an asdf plugin for personal use. https://github.com/aweris/asdf-dagger , maybe this could be helpful to others as well
Hi! 👋 ,
I'm been digging through the docs and I'm wondering, what the thoughts are with packages & imports?
Currently from what I understand shared packages exist in dagger/pkg, running dagger project update (should) pull down what I need inside a dagger project from these packages.
Are there any thoughts to make it possible to be able to import from other git repos (like my thoughts are along the lines of if I had to provide a catalog of customisations, I'd like to be able to expose them as things teams could import) - for the meantime I guess I can check stuff into the cue.mod file in repos and share that between different repos that have the same actions
Another thing,
I've started/planning on solving some CI-y things I've come across in the past with Dagger and having playbooks for them to reference. Things like:
- Templating a catalog of actions (hypothetically to provide to a team - relates to the question above)
- Using the host OS to create docker containers for a web app / services to run e2e tests
- Updating an infra as code repo post building an image (argo CD deployments)
Do we have a space where we share/showcase stuff like this? (maybe someones already done something similar 😄 )
Hi Bilal look at the “use cases” section in the docs. Also in docs/use-cases in the github repo, there articles not yet published I think.
Hi all 👋 finally remembered to join the discord server! Having actively worked on GoCD 10 years ago (😱) and been among the very first Docker partners in Europe back in 2015 I'm really looking forward to seeing how two of my favourite "things" - CI/CD & containers - will progress together 👏
Will there be a talk about dagger at KubeCon EU?
Hi, can anyone share any code on how to push an image up into an Azure repository please?
push azure
Hey guys, I'm currently preparing a lightning talk to present to the messagebird engineering department (for a weekly friday talk session we have). I have an idea of what I want to quickly demo (docker image build + maybe helm chart deploy) but I would love a bit of help from the dagger team/community, especially on the CUE front, to make sure I explain CUE and dagger correctly
Does Dagger support "DockerSlim" for making images smaller?
Hey thanks for your involvement, feel free to ask in #help-old-do-not-post, I'm never far 😄
Not sure, but that should be possible since it's a CLI tool, feel free to open a feature request on GH or try to build your own slim package in our experimental universe 😄
Sweet! It's a really short talk (~10mn) so I'm probably going to skip over a lot of stuff. I'll reach out if I need help in particular.
Is it possible to, in the client: filesystem: to read a directory above where the dagger.cue file is, or must the files be in the same directory or in sub folders?
You should be able yes, but relative paths are in relation to where you run the dagger command, not the plan file.
I see, so I've got 3x docker-compose files in one directory, and then sub folders for "dev", "staging" and "prod". I was going to have a generic dagger.cue file, in the parent folder, and then issue command such as dagger do devDeploy or dagger do stagingDeploy, but my plan is getting messy because of the size of it, so I decided to have 3x dagger.cue files, each in the separate folders, to keep it simpler, but I need to include the docker-compose file, for the environment of choice, by specifying the folder above? (if that makes sense)?
you can do dagger do -p ./dev devDeploy from the root of your repo
since they are different cue files, I guess you could even do dagger do -p ./dev deploy, I don't believe the actions of each environments should clash on their names since they would be separated
(let me check that)
Great! Thanks, that worked as expected 🙂
What's the best way of separating actions, so that they are independent?
What I like to do is https://github.com/dagger/dagger/issues/1316#issuecomment-1007824792
Looks good, but over-my-head sadly 🙂
So, with what I've got already, if I have action 1, 2 and 3. If I run action 3, am I correct in thinking that it will run action 1 and 2 before?
if the .input of the action n depends on the .output of the n-1
otherwise you need to create artificial dependencies with some env var. I think this hack is used in particubes while we add this explicit dependency feature.
Thank you. I think I understand 🙂 I'm going to test
(the .input is the base image/container FS that this current container will run on.
The .output is the base FS with all the modifications that happened during the container execution)
Thank you
hi, there are a way to check if ninput image is not provided, to use default
in the following spirit, it not working:
// The docker image to use
input: docker.#Image | *null
if input == null {
_defaultImage: #InstallTools & {
"env": env
}
input: _defaultImage.output
}
Default img