The purpose of this repo is to compare common automation tasks using dagger and earthly for a simple counter service that stores counter in redis server.
This repo contains dagger implementation.
The earthly implementation is in this repo.
Saving image in local docker instance is not possible. Image is always published to container registry.
✗ dagger call image --src=.
✘ DaggerToRescue.image(
src: ✔ ModuleSource.resolveDirectoryFromCaller(path: "."): Directory! 0.0s
): String! 1.8s
! call function "Image": process "/runtime" did not complete successfully: exit code: 2
┃ invoke: input: container.from.withFile.withEntrypoint.publish resolve: failed to export: failed to push counter/counter:latest: push access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
┃
✘ Container.publish(address: "counter/counter:latest"): String! 0.9s
! failed to export: failed to push counter/counter:latest: push access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failedNot possible? Dagger cannot execute on host environment, only in containers.