create_dockerfile_application
Set up a new application from a Dockerfile. Provide the base64-encoded Dockerfile content along with project, environment, and server information.
Instructions
Create a new application from a Dockerfile
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_uuid | Yes | Project UUID | |
| environment_name | Yes | Environment name | |
| environment_uuid | No | Environment UUID (optional) | |
| server_uuid | Yes | Server UUID | |
| destination_uuid | No | Destination UUID (optional if server has single destination) | |
| dockerfile | Yes | Dockerfile content (base64 encoded) | |
| ports_exposes | Yes | Ports to expose (e.g., "3000,8080") | |
| name | No | Application name (optional, auto-generated if not provided) | |
| description | No | Application description | |
| instant_deploy | No | Deploy immediately after creation |
Implementation Reference
- src/tools/handlers.ts:193-199 (handler)Handler case for 'create_dockerfile_application' tool. Validates required params (project_uuid, environment_name, server_uuid, dockerfile, ports_exposes) and POSTs to /applications/dockerfile endpoint.
case 'create_dockerfile_application': requireParam(args, 'project_uuid'); requireParam(args, 'environment_name'); requireParam(args, 'server_uuid'); requireParam(args, 'dockerfile'); requireParam(args, 'ports_exposes'); return client.post('/applications/dockerfile', args); - src/tools/definitions.ts:353-371 (schema)Schema definition for create_dockerfile_application. Defines input properties (project_uuid, environment_name, environment_uuid, server_uuid, destination_uuid, dockerfile, ports_exposes, name, description, instant_deploy) with required fields: project_uuid, environment_name, server_uuid, dockerfile, ports_exposes.
{ name: 'create_dockerfile_application', description: 'Create a new application from a Dockerfile', inputSchema: { type: 'object', properties: { project_uuid: { type: 'string', description: 'Project UUID' }, environment_name: { type: 'string', description: 'Environment name' }, environment_uuid: { type: 'string', description: 'Environment UUID (optional)' }, server_uuid: { type: 'string', description: 'Server UUID' }, destination_uuid: { type: 'string', description: 'Destination UUID (optional if server has single destination)' }, dockerfile: { type: 'string', description: 'Dockerfile content (base64 encoded)' }, ports_exposes: { type: 'string', description: 'Ports to expose (e.g., "3000,8080")' }, name: { type: 'string', description: 'Application name (optional, auto-generated if not provided)' }, description: { type: 'string', description: 'Application description' }, instant_deploy: { type: 'boolean', description: 'Deploy immediately after creation', default: false } }, required: ['project_uuid', 'environment_name', 'server_uuid', 'dockerfile', 'ports_exposes'] } - src/tools/handlers.ts:1-3 (registration)The handleTool function is exported from handlers.ts and registered via ListToolsRequestSchema/CallToolRequestSchema in src/index.ts (lines 36-67). The tool name 'create_dockerfile_application' is matched in a switch statement.
import { CoolifyClient } from '../client.js'; import { ErrorCode, McpError } from '@modelcontextprotocol/sdk/types.js'; import { isConfirmRequired, isDangerousOperation, getDangerWarning } from './definitions.js';