Merge dagger.io/dagger/engine into dagger.io/dagger
Signed-off-by: Solomon Hykes <solomon@dagger.io>
This commit is contained in:
@@ -2,7 +2,6 @@ package docker
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/dagger/engine"
|
||||
)
|
||||
|
||||
// Modular build API for Docker containers
|
||||
@@ -47,7 +46,7 @@ import (
|
||||
dest: string | *"/"
|
||||
|
||||
// Execute copy operation
|
||||
_copy: engine.#Copy & {
|
||||
_copy: dagger.#Copy & {
|
||||
"input": input.rootfs
|
||||
"contents": contents
|
||||
"source": source
|
||||
|
@@ -2,7 +2,6 @@ package docker
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/dagger/engine"
|
||||
)
|
||||
|
||||
// A container image
|
||||
@@ -11,7 +10,7 @@ import (
|
||||
rootfs: dagger.#FS
|
||||
|
||||
// Image config
|
||||
config: engine.#ImageConfig
|
||||
config: dagger.#ImageConfig
|
||||
}
|
||||
|
||||
// A ref is an address for a remote container image
|
||||
@@ -21,4 +20,4 @@ import (
|
||||
// - "index.docker.io/dagger:latest"
|
||||
// - "index.docker.io/dagger:latest@sha256:a89cb097693dd354de598d279c304a1c73ee550fbfff6d9ee515568e0c749cfe"
|
||||
// FIXME: add formatting constraints
|
||||
#Ref: engine.#Ref
|
||||
#Ref: dagger.#Ref
|
||||
|
@@ -2,7 +2,6 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
"dagger.io/dagger/engine"
|
||||
"dagger.io/dagger"
|
||||
)
|
||||
|
||||
@@ -17,7 +16,7 @@ import (
|
||||
secret: dagger.#Secret
|
||||
}
|
||||
|
||||
_op: engine.#Pull & {
|
||||
_op: dagger.#Pull & {
|
||||
"source": source
|
||||
if auth != _|_ {
|
||||
"auth": auth
|
||||
|
@@ -2,7 +2,6 @@ package docker
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/dagger/engine"
|
||||
)
|
||||
|
||||
// Upload an image to a remote repository
|
||||
@@ -22,7 +21,7 @@ import (
|
||||
// Image to push
|
||||
image: #Image
|
||||
|
||||
_push: engine.#Push & {
|
||||
_push: dagger.#Push & {
|
||||
"dest": dest
|
||||
if auth != _|_ {
|
||||
"auth": auth
|
||||
|
@@ -4,7 +4,6 @@ import (
|
||||
"list"
|
||||
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/dagger/engine"
|
||||
)
|
||||
|
||||
// Run a command in a container
|
||||
@@ -15,7 +14,7 @@ import (
|
||||
always: bool | *false
|
||||
|
||||
// Filesystem mounts
|
||||
mounts: [name=string]: engine.#Mount
|
||||
mounts: [name=string]: dagger.#Mount
|
||||
|
||||
// Expose network ports
|
||||
// FIXME: investigate feasibility
|
||||
@@ -55,7 +54,7 @@ import (
|
||||
|
||||
// Environment variables
|
||||
// Example: {"DEBUG": "1"}
|
||||
env: [string]: string | engine.#Secret
|
||||
env: [string]: string | dagger.#Secret
|
||||
|
||||
// Working directory for the command
|
||||
// Example: "/src"
|
||||
@@ -87,7 +86,7 @@ import (
|
||||
rootfs: dagger.#FS & _exec.output
|
||||
files: [path=string]: {
|
||||
contents: string & _read.contents
|
||||
_read: engine.#ReadFile & {
|
||||
_read: dagger.#ReadFile & {
|
||||
input: _exec.output
|
||||
"path": path
|
||||
}
|
||||
@@ -109,7 +108,7 @@ import (
|
||||
}
|
||||
|
||||
// Actually execute the command
|
||||
_exec: engine.#Exec & {
|
||||
_exec: dagger.#Exec & {
|
||||
"input": input.rootfs
|
||||
"always": always
|
||||
"mounts": mounts
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package docker
|
||||
|
||||
import (
|
||||
"dagger.io/dagger/engine"
|
||||
"dagger.io/dagger"
|
||||
)
|
||||
|
||||
// Change image config
|
||||
@@ -10,9 +10,9 @@ import (
|
||||
input: #Image
|
||||
|
||||
// The image config to change
|
||||
config: engine.#ImageConfig
|
||||
config: dagger.#ImageConfig
|
||||
|
||||
_set: engine.#Set & {
|
||||
_set: dagger.#Set & {
|
||||
"input": input.config
|
||||
"config": config
|
||||
}
|
||||
|
@@ -2,7 +2,6 @@ package docker
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/dagger/engine"
|
||||
|
||||
"universe.dagger.io/alpine"
|
||||
"universe.dagger.io/docker"
|
||||
@@ -27,7 +26,7 @@ dagger.#Plan & {
|
||||
]
|
||||
}
|
||||
|
||||
verify: engine.#ReadFile & {
|
||||
verify: dagger.#ReadFile & {
|
||||
input: image.output.rootfs
|
||||
path: "/test.txt"
|
||||
}
|
||||
@@ -60,7 +59,7 @@ dagger.#Plan & {
|
||||
]
|
||||
}
|
||||
|
||||
verify: engine.#ReadFile & {
|
||||
verify: dagger.#ReadFile & {
|
||||
input: image.output.rootfs
|
||||
path: "/test.txt"
|
||||
}
|
||||
|
@@ -2,7 +2,6 @@ package docker
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/dagger/engine"
|
||||
"universe.dagger.io/docker"
|
||||
)
|
||||
|
||||
@@ -13,7 +12,7 @@ dagger.#Plan & {
|
||||
// Test: change image config with docker.#Set
|
||||
set: {
|
||||
image: output: docker.#Image & {
|
||||
rootfs: engine.#Scratch
|
||||
rootfs: dagger.#Scratch
|
||||
config: {
|
||||
cmd: ["/bin/sh"]
|
||||
env: PATH: "/sbin:/bin"
|
||||
@@ -44,8 +43,8 @@ dagger.#Plan & {
|
||||
|
||||
// Test: image config behavior is correct
|
||||
config: {
|
||||
build: engine.#Dockerfile & {
|
||||
source: engine.#Scratch
|
||||
build: dagger.#Dockerfile & {
|
||||
source: dagger.#Scratch
|
||||
dockerfile: contents: """
|
||||
FROM alpine:3.15.0
|
||||
RUN echo -n 'not hello from dagger' > /dagger.txt
|
||||
|
@@ -2,7 +2,6 @@ package docker
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
"dagger.io/dagger/engine"
|
||||
|
||||
"universe.dagger.io/docker"
|
||||
"universe.dagger.io/alpine"
|
||||
@@ -25,7 +24,7 @@ dagger.#Plan & {
|
||||
}
|
||||
}
|
||||
|
||||
verify: engine.#ReadFile & {
|
||||
verify: dagger.#ReadFile & {
|
||||
input: run.output.rootfs
|
||||
path: "/output.txt"
|
||||
}
|
||||
@@ -61,7 +60,7 @@ dagger.#Plan & {
|
||||
export: directories: "/test": _
|
||||
}
|
||||
|
||||
verify: engine.#ReadFile & {
|
||||
verify: dagger.#ReadFile & {
|
||||
input: run.export.directories."/test".contents
|
||||
path: "/output.txt"
|
||||
}
|
||||
|
Reference in New Issue
Block a user