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
dockerOptions resource to your shippable.yml file. For example, to set memory to 1024MB and expose port 80, you would write the following snippet:
resources: - name: app_options type: dockerOptions version: memory: 1024 portMappings: - 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:
jobs: - name: app_service_def type: manifest steps: - 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.