Customizing container options

By default, we set the following options while deploying your container:

  • memory : 400mb
  • desiredCount : 1
  • cpuShares : 0
  • All available CPU
  • no ENVs are added to the container

However, you can customize these and many other options by including a dockerOptions resource in your service definition.


1. Add a dockerOptions resource

Add a dockerOptions resource to your shippable.yml file. For example, to set memory to 1024MB and expose port 80, you would write the following snippet:


  - name: app_options
    type: dockerOptions
      memory: 1024
        - 80:80

For a complete reference for dockerOptions, read the resource page.

2. Update service definition

Next, you should update your manifest with this new resource:


  - name: app_service_def
    type: manifest
     - IN: app_image
     - IN: app_options

3. Commit your shippable.yml

Commit your shippable.yml and the workflow will be updated automatically. Next time your deploy job runs, the new options will take effect.