interface ImageConfiguration
Language | Type name |
---|---|
.NET | Amazon.CDK.AWS.AppRunner.ImageConfiguration |
Java | software.amazon.awscdk.services.apprunner.ImageConfiguration |
Python | aws_cdk.aws_apprunner.ImageConfiguration |
TypeScript (source) | @aws-cdk/aws-apprunner » ImageConfiguration |
Describes the configuration that AWS App Runner uses to run an App Runner service using an image pulled from a source image repository.
Example
import * as assets from '@aws-cdk/aws-ecr-assets';
const imageAsset = new assets.DockerImageAsset(this, 'ImageAssets', {
directory: path.join(__dirname, './docker.assets'),
});
new apprunner.Service(this, 'Service', {
source: apprunner.Source.fromAsset({
imageConfiguration: { port: 8000 },
asset: imageAsset,
}),
});
Properties
Name | Type | Description |
---|---|---|
environment? | { [string]: string } | Environment variables that are available to your running App Runner service. |
port? | number | The port that your application listens to in the container. |
start | string | An optional command that App Runner runs to start the application in the source image. |
environment?
Type:
{ [string]: string }
(optional, default: no environment variables)
Environment variables that are available to your running App Runner service.
port?
Type:
number
(optional, default: 8080)
The port that your application listens to in the container.
startCommand?
Type:
string
(optional, default: no start command)
An optional command that App Runner runs to start the application in the source image.
If specified, this command overrides the Docker image’s default start command.