因此,我是ecs / ecr的新手,但似乎我必须在存储库名称后命名(带有标签)图像,以便将该图像推送到存储库。
所以我的问题是:是否打算让用户(我)仅将单个映像和该映像的任何关联版本推送到ecr中的单个存储库,从而在我需要推送完全不同的映像时创建另一个存储库?
基本上,一个用于nginx的仓库,一个用于postgressql的仓库,等等。
我正在 CloudFormation 中创建 ECS 服务。
我没有收到任何错误,它只会位于阶段的 CREATE_IN_PROGRESS 处logical ID = Service。
这是我的 CF 模板(ECS 集群和上面的一些其他内容,但由于相关性而被删除)。
TaskDefinition:
Type: 'AWS::ECS::TaskDefinition'
Properties:
Family: flink
Memory: 2048
Cpu: 512
NetworkMode: awsvpc
RequiresCompatibilities:
- FARGATE
ContainerDefinitions:
- Name: flink-jobmanager
Image: ACCOUNT_ID.dkr.ecr.us-west-1.amazonaws.com/teststack-flink:latest
Essential: true
PortMappings:
- ContainerPort: 8081
HostPort: 8081
LogConfiguration:
LogDriver: awslogs
Options:
awslogs-group: ecs/flink-stream
awslogs-region: !Ref AWS::Region
awslogs-stream-prefix: ecs
Command:
- jobmanager
- Name: flink-taskmanager
Image: ACCOUNT_ID.dkr.ecr.us-west-1.amazonaws.com/teststack-flink:latest
Essential: true
Command:
- taskmanager
ExecutionRoleArn: !Sub arn:aws:iam::${AWS::AccountId}:role/ecsTaskExecutionRole
Volumes: []
TaskRoleArn: !Sub arn:aws:iam::${AWS::AccountId}:role/ecsTaskExecutionRole
Tags:
- …Run Code Online (Sandbox Code Playgroud) 我在CDK或CloudFormation文档中没有看到任何有关 AWS Image Builder 容器配方的资源。
我能找到的最接近的是对图像配方的支持,不用于创建容器图像,仅用于创建 AMI。我确实需要将此资源添加到我的 CF 堆栈中,以创建一个图像(如在容器图像中)管道,将生成的图像推送到 ECR 中...到目前为止,我只能手动执行此操作。
我正在使用 TS CDK 库,但这并不重要。
我正在尝试配置 apache2 以便它与 django 进行通信,但我无法访问“sites-available”目录,我认为“默认”目录应该位于该目录中。以下是我在“etc/apache2/”目录下的文件结构:
??? extra
? ??? httpd-autoindex.conf
? ??? httpd-dav.conf
? ??? httpd-default.conf
? ??? httpd-info.conf
? ??? httpd-languages.conf
? ??? httpd-manual.conf
? ??? httpd-mpm.conf
? ??? httpd-multilang-errordoc.conf
? ??? httpd-ssl.conf
? ??? httpd-userdir.conf
? ??? httpd-vhosts.conf
? ??? proxy-html.conf
??? httpd.conf
??? httpd.conf.bak
??? httpd.conf.pre-update
??? magic
??? mime.types
??? original
? ??? extra
? ? ??? httpd-autoindex.conf
? ? ??? httpd-dav.conf
? ? ??? httpd-default.conf
? ? ??? httpd-info.conf
? ? ??? httpd-languages.conf
? ? …Run Code Online (Sandbox Code Playgroud) 我需要在正则表达式中添加插值。
我现在所拥有的就是var re = /212.129.52.45/gi
我需要的是将其替换212.129.52.45为ip_appress