Difference between revisions of "Command (Containers)"

From wikieduonline
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 5: Line 5:
 
** [[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"
 +
      ]
 +
      ...
 +
    }
 +
  ])
 +
  ...
 +
}
  
  
  
  
{{Dockerfile}}
+
* {{RUN}}
 +
* {{Dockerfile}}

Latest 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"
     ]
     ...
   }
 ])
 ...
}



Advertising: