Difference between revisions of "Command (Containers)"
Jump to navigation
Jump to search
Line 4: | Line 4: | ||
** <code>[[aws ecs register-task-definition: ContainerDefinitions]]</code> | ** <code>[[aws ecs register-task-definition: ContainerDefinitions]]</code> | ||
** [[Terraform aws ecs task definition: container definitions]] | ** [[Terraform aws ecs task definition: container definitions]] | ||
+ | |||
+ | [[ChatGPT]] example: | ||
+ | resource "[[aws_ecs_task_definition]]" "example" { | ||
+ | family = "example" | ||
+ | container_definitions = jsonencode([ | ||
+ | { | ||
+ | name = "example-container" | ||
+ | image = "example-image" | ||
+ | command = [ | ||
+ | "sh", | ||
+ | "[[-c]]", | ||
+ | "echo 'Hello, World!' > /path/to/file.txt" | ||
+ | ] | ||
+ | ... | ||
+ | } | ||
+ | ]) | ||
+ | ... | ||
+ | } | ||
Revision as of 10:05, 25 April 2023
ChatGPT example:
resource "aws_ecs_task_definition" "example" { family = "example" container_definitions = jsonencode([ { name = "example-container" image = "example-image" command = [ "sh", "-c", "echo 'Hello, World!' > /path/to/file.txt" ] ... } ]) ... }
- RUN, CMD, ENTRYPOINT, command (Containers)
Dockerfile: FROM, RUN, CMD, ENTRYPOINT, WORKDIR, COPY, ADD, USER, ENV, ARG, HEALTHCHECK
,hadolint, LABEL, EXPOSE
Advertising: