Update docker.#Dockerfile to be a 1:1 mirror to engine.#Dockerfile

Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
This commit is contained in:
Vasek - Tom C 2022-01-28 13:48:39 +01:00
parent 22183cb092
commit 562678779e
No known key found for this signature in database
GPG Key ID: 175D82E572427960

View File

@ -61,18 +61,54 @@ import (
// Build step that executes a Dockerfile // Build step that executes a Dockerfile
#Dockerfile: { #Dockerfile: {
// Source directory // Source image
source: dagger.#FS input?: #Image
// FIXME: not yet implemented // FIXME cannot replace with _source: *engine.#Scratch | input.rootfs
*{ // Got error "$dagger" not found
// Look for Dockerfile in source at default path _source: input.rootfs
path: "Dockerfile" if input == _|_ {
_source: engine.#Scratch
}
// Dockerfile definition or path into source
dockerfile: *{
path: string | *"Dockerfile"
} | { } | {
// Look for Dockerfile in source at a custom path
path: string
} | {
// Custom dockerfile contents
contents: string contents: string
} }
// Registry authentication
// Key must be registry address
auth: [registry=string]: {
username: string
secret: dagger.#Secret
}
platforms: [...string]
target?: string
buildArg: [string]: string
label: [string]: string
hosts: [string]: string
_build: engine.#Dockerfile & {
source: _source
"auth": [ for target, creds in auth {
"target": target
creds
}]
"dockerfile": dockerfile
"platforms": platforms
if target != _|_ {
"target": target
}
"buildArg": buildArg
"label": label
"hosts": hosts
}
output: #Image & {
rootfs: _build.output
config: _build.config
}
} }