Module : docker

Module Overview

This module offers an annotation based docker extension implementation for ballerina.

Annotation Usage Sample:

import ballerina/http;
import ballerina/log;
import ballerina/docker;

listener http:Listener helloWorldEP = new(9090);

@http:ServiceConfig {
      basePath: "/helloWorld"
@docker:Config {
    registry: "",
    name: "helloworld",
    tag: "v1.0"
service helloWorld on helloWorldEP {
    resource function sayHello(http:Caller caller, http:Request request) {
        http:Response response = new;
        response.setTextPayload("Hello, World from service helloWorld ! \n");
        var responseResult = caller->respond(response);
        if (responseResult is error) {
            log:printError("error responding back to client.", err = responseResult);


DockerConfiguration Docker annotation configuration.
ExposeConfig Expose ports for docker.
FileConfig External file type for docker.
FileConfigs External File configurations for docker.



@docker:Config annotation to configure docker artifact generation.


@docker:CopyFile annotation to copy external files to docker image.


@docker:Expose annotation to expose ballerina ports.