Add compose.#Up test in universe
Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
107
docs/reference/universe/docker/README.md
Normal file
107
docs/reference/universe/docker/README.md
Normal file
@@ -0,0 +1,107 @@
|
||||
---
|
||||
sidebar_label: docker
|
||||
---
|
||||
|
||||
# dagger.io/docker
|
||||
|
||||
Docker container operations
|
||||
|
||||
```cue
|
||||
import "dagger.io/docker"
|
||||
```
|
||||
|
||||
## docker.#Build
|
||||
|
||||
Build a Docker image from source, using included Dockerfile
|
||||
|
||||
### docker.#Build Inputs
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*source* | `dagger.#Artifact` |- |
|
||||
|
||||
### docker.#Build Outputs
|
||||
|
||||
_No output._
|
||||
|
||||
## docker.#Command
|
||||
|
||||
A container image that can run any docker command
|
||||
|
||||
### docker.#Command Inputs
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*command* | `string` |Command to execute |
|
||||
|*registries* | `[]` |Image registries |
|
||||
|
||||
### docker.#Command Outputs
|
||||
|
||||
_No output._
|
||||
|
||||
## docker.#ImageFromDockerfile
|
||||
|
||||
Build a Docker image from the provided Dockerfile contents
|
||||
|
||||
### docker.#ImageFromDockerfile Inputs
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*dockerfile* | `string` |Dockerfile passed as a string |
|
||||
|*context* | `dagger.#Artifact` |Build context |
|
||||
|
||||
### docker.#ImageFromDockerfile Outputs
|
||||
|
||||
_No output._
|
||||
|
||||
## docker.#Pull
|
||||
|
||||
Pull a docker container
|
||||
|
||||
### docker.#Pull Inputs
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*from* | `string` |Remote ref (example: "index.docker.io/alpine:latest") |
|
||||
|
||||
### docker.#Pull Outputs
|
||||
|
||||
_No output._
|
||||
|
||||
## docker.#Push
|
||||
|
||||
Push a docker image
|
||||
|
||||
### docker.#Push Inputs
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*ref* | `string` |Remote ref (example: "index.docker.io/alpine:latest") |
|
||||
|*source* | `dagger.#Artifact` |Image |
|
||||
|
||||
### docker.#Push Outputs
|
||||
|
||||
_No output._
|
||||
|
||||
## docker.#Run
|
||||
|
||||
### docker.#Run Inputs
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*ssh.host* | `string` |ssh host |
|
||||
|*ssh.user* | `string` |ssh user |
|
||||
|*ssh.port* | `*22 \| int` |ssh port |
|
||||
|*ssh.key* | `dagger.#Secret` |private key |
|
||||
|*ref* | `string` |Image reference (e.g: nginx:alpine) |
|
||||
|*run.ssh.host* | `string` |ssh host |
|
||||
|*run.ssh.user* | `string` |ssh user |
|
||||
|*run.ssh.port* | `*22 \| int` |ssh port |
|
||||
|*run.ssh.key* | `dagger.#Secret` |private key |
|
||||
|*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 docker container run -d $OPTS "$IMAGE_REF"\n """` |Command to execute |
|
||||
|*run.env.IMAGE_REF* | `string` |- |
|
||||
|*run.registries* | `[]` |Image registries |
|
||||
|
||||
### docker.#Run Outputs
|
||||
|
||||
_No output._
|
36
docs/reference/universe/docker/compose.md
Normal file
36
docs/reference/universe/docker/compose.md
Normal file
@@ -0,0 +1,36 @@
|
||||
---
|
||||
sidebar_label: compose
|
||||
---
|
||||
|
||||
# dagger.io/docker/compose
|
||||
|
||||
```cue
|
||||
import "dagger.io/docker/compose"
|
||||
```
|
||||
|
||||
## compose.#Client
|
||||
|
||||
A container image to run the docker-compose client
|
||||
|
||||
### compose.#Client Inputs
|
||||
|
||||
_No input._
|
||||
|
||||
### compose.#Client Outputs
|
||||
|
||||
_No output._
|
||||
|
||||
## compose.#Up
|
||||
|
||||
### compose.#Up Inputs
|
||||
|
||||
| Name | Type | Description |
|
||||
| ------------- |:-------------: |:-------------: |
|
||||
|*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.package."docker-compose"* | `true` |- |
|
||||
|*run.registries* | `[]` |Image registries |
|
||||
|
||||
### compose.#Up Outputs
|
||||
|
||||
_No output._
|
Reference in New Issue
Block a user