Skip to content

Container

Container Stack is a declarative DevOps software development kit (SDK) to publish data-driven applications in production. As a cohesive Stack, it seamlessly integrates with web-server-based application images constructed atop DataOS, empowering users to leverage DataOS's Compute Resource to execute external tools or applications. With Container Stack, application development is no longer bound by programming language constraints, as it enables the fluid deployment of diverse applications onto a robust, flexible infrastructure.

When deploying an application using Container Stack, the containerized image contains all the essential functionalities and logic required for the application, while execution of the image occurs within DataOS via the utilization of Container Stack, which can be invoked or called within a Service or a Workflow Resource.

Syntax of Container Stack manifest

Container Manifest Configuration Syntax

Container manifest configuration syntax

Getting Started with Container Stack

Deploying Images from a Public DockerHub Repository

To begin the journey with Container Stack, let’s take an image already available on the public DockerHub repository and run it atop DataOS through Container Stack. To know more, navigate to the link below:

Deploying Images on Public DockerHub

Deploying Images from a Private DockerHub Repository

You can also deploy custom-built images from a private DockerHub repository. To know more about this case scenario, navigate to the link below:

Deploying images on a Private DockerHub

Components of Container Stack

# Resource Section
name: ${container-stack}
version: v1
type: ${workflow/service}
workflow/service: # Workflow/Service Specific Section
# ...
# ...
# ...
  stack: container # Stack (Here it's Container)
  envs:
    LOG_LEVEL: ${info} # Log Level
# Container Stack-specific Section
  container:
    image: ${swagger/swagger-ui} # Path of the Docker Image
    command: # Command
      - ${streamlit}
    arguments: # Arguments
      - ${run}
      - ${app.py}

Resource meta section

Container Stack can be orchestrated via a Workflow or a Service. Workflow/Service are DataOS Resources and are both provisioned as runnable. To learn more about the manifest configurations for a Workflow/Service, refer to their respective documentations.

Container Stack-specific Section

container

All the configuration fields and values for the Container Stack are provided within the Container-specific section.

container:
  {} # All the fields and values for the Container stack are specified here

image

The path to the respective Docker Image within the DockerHub repository.

Type: string

Default: NA

image: swagger/swagger-ui # Path of the Docker Image

command

This includes the commands that are mentioned within the CMD section of the Docker file.

For e.g., If the below is your Docker File, then the commands are provided within the CMD section:

# Dockerfile

FROM python:3.8-slim-buster

RUN pip install streamlit

WORKDIR /app
COPY app.py .

CMD ["streamlit", "run", "app.py"]
#     command      arguments 1 & 2

Syntax:

command: 
  - streamlit

arguments

The arguments are the additional arguments apart form the primary command specified within the Dockerfile, as described above

arguments:
  - run
  - app.py

Recipes

How to deploy a Streamlit App on DataOS

Container Stack within a Workflow

Creating shortcut for Container Stack based applications