stdlib: docker: clean up docker.#Command inputs
Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
parent
e5c571b8a9
commit
322997b74a
@ -31,10 +31,7 @@ A container image that can run any docker command
|
|||||||
|
|
||||||
### docker.#Command Inputs
|
### docker.#Command Inputs
|
||||||
|
|
||||||
| Name | Type | Description |
|
_No input._
|
||||||
| ------------- |:-------------: |:-------------: |
|
|
||||||
|*command* | `string` |Command to execute |
|
|
||||||
|*registries* | `[]` |Image registries |
|
|
||||||
|
|
||||||
### docker.#Command Outputs
|
### docker.#Command Outputs
|
||||||
|
|
||||||
@ -50,8 +47,6 @@ Load a docker image into a docker engine
|
|||||||
| ------------- |:-------------: |:-------------: |
|
| ------------- |:-------------: |:-------------: |
|
||||||
|*tag* | `string` |Name and optionally a tag in the 'name:tag' format |
|
|*tag* | `string` |Name and optionally a tag in the 'name:tag' format |
|
||||||
|*source* | `dagger.#Artifact` |Image source |
|
|*source* | `dagger.#Artifact` |Image source |
|
||||||
|*load.command* | `"docker load -i /src/image.tar"` |Command to execute |
|
|
||||||
|*load.registries* | `[]` |Image registries |
|
|
||||||
|
|
||||||
### docker.#Load Outputs
|
### docker.#Load Outputs
|
||||||
|
|
||||||
@ -98,9 +93,7 @@ Push a docker image to a remote registry
|
|||||||
| Name | Type | Description |
|
| Name | Type | Description |
|
||||||
| ------------- |:-------------: |:-------------: |
|
| ------------- |:-------------: |:-------------: |
|
||||||
|*ref* | `string` |Image reference (e.g: nginx:alpine) |
|
|*ref* | `string` |Image reference (e.g: nginx:alpine) |
|
||||||
|*run.command* | `"""\n # Run detach container\n OPTS=""\n \n if [ ! -z "$CONTAINER_NAME" ]; then\n \tOPTS="$OPTS --name $CONTAINER_NAME"\n fi\n \n if [ ! -z "$CONTAINER_PORTS" ]; then\n \tOPTS="$OPTS -p $CONTAINER_PORTS"\n fi\n \n docker container run -d $OPTS "$IMAGE_REF"\n """` |Command to execute |
|
|
||||||
|*run.env.IMAGE_REF* | `string` |- |
|
|*run.env.IMAGE_REF* | `string` |- |
|
||||||
|*run.registries* | `[]` |Image registries |
|
|
||||||
|
|
||||||
### docker.#Run Outputs
|
### docker.#Run Outputs
|
||||||
|
|
||||||
|
@ -18,10 +18,6 @@ import "alpha.dagger.io/docker/compose"
|
|||||||
| ------------- |:-------------: |:-------------: |
|
| ------------- |:-------------: |:-------------: |
|
||||||
|*name* | `*"source" \| string` |App name (use as COMPOSE_PROJECT_NAME) |
|
|*name* | `*"source" \| string` |App name (use as COMPOSE_PROJECT_NAME) |
|
||||||
|*registries* | `[]` |Image registries |
|
|*registries* | `[]` |Image registries |
|
||||||
|*run.command* | `"""\n if [ -n "$DOCKER_HOSTNAME" ]; then\n \tssh -i /key -fNT -o "StreamLocalBindUnlink=yes" -L "$(pwd)"/docker.sock:/var/run/docker.sock -p "$DOCKER_PORT" "$DOCKER_USERNAME"@"$DOCKER_HOSTNAME"\n \texport DOCKER_HOST="unix://$(pwd)/docker.sock"\n fi\n \n # Extend session duration\n echo "Host *\\nServerAliveInterval 240" \>\> "$HOME"/.ssh/config\n chmod 600 "$HOME"/.ssh/config\n \n # Move compose\n if [ -d "$SOURCE_DIR" ]; then\n \tif [ -f docker-compose.yaml ]; then\n \t\tcp docker-compose.yaml "$SOURCE_DIR"/docker-compose.yaml\n \tfi\n \tcd "$SOURCE_DIR"\n fi\n \n docker-compose build\n docker-compose up -d\n """` |Command to execute |
|
|
||||||
|*run.env.COMPOSE_PROJECT_NAME* | `*"source" \| string` |- |
|
|
||||||
|*run.package."docker-compose"* | `true` |- |
|
|
||||||
|*run.registries* | `[]` |Image registries |
|
|
||||||
|
|
||||||
### compose.#App Outputs
|
### compose.#App Outputs
|
||||||
|
|
||||||
|
@ -31,11 +31,11 @@ import (
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Command to execute
|
// Command to execute
|
||||||
command: string @dagger(input)
|
command: string
|
||||||
|
|
||||||
// Environment variables shared by all commands
|
// Environment variables shared by all commands
|
||||||
env: {
|
env: {
|
||||||
[string]: string @dagger(input)
|
[string]: string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mount content from other artifacts
|
// Mount content from other artifacts
|
||||||
@ -44,17 +44,17 @@ import (
|
|||||||
from: dagger.#Artifact
|
from: dagger.#Artifact
|
||||||
} | {
|
} | {
|
||||||
secret: dagger.#Secret
|
secret: dagger.#Secret
|
||||||
} @dagger(input)
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mount persistent cache directories
|
// Mount persistent cache directories
|
||||||
cache: {
|
cache: {
|
||||||
[string]: true @dagger(input)
|
[string]: true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mount temporary directories
|
// Mount temporary directories
|
||||||
tmpfs: {
|
tmpfs: {
|
||||||
[string]: true @dagger(input)
|
[string]: true
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mount docker socket
|
// Mount docker socket
|
||||||
@ -62,7 +62,7 @@ import (
|
|||||||
|
|
||||||
// Additional packages to install
|
// Additional packages to install
|
||||||
package: {
|
package: {
|
||||||
[string]: true | false | string @dagger(input)
|
[string]: true | false | string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Image registries
|
// Image registries
|
||||||
@ -70,7 +70,7 @@ import (
|
|||||||
target?: string
|
target?: string
|
||||||
username: string
|
username: string
|
||||||
secret: dagger.#Secret
|
secret: dagger.#Secret
|
||||||
}] @dagger(input)
|
}]
|
||||||
|
|
||||||
// Copy contents from other artifacts
|
// Copy contents from other artifacts
|
||||||
copy: [string]: from: dagger.#Artifact
|
copy: [string]: from: dagger.#Artifact
|
||||||
|
Reference in New Issue
Block a user