- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
UserData:
'Fn::Base64': |
#!/bin/bash
yum -y install docker
dockerd
docker pull apache/superset
在上面提到的 Cloudformation UserData 标签中:一切正常,直到 dockerd
。 docker pull 命令不执行。模板不会生成任何错误。但是当我 ssh 进入由我的 cloudformation 模板创建的 ec2 实例时 - 我看不到 docker 镜像。我可以手动运行 docker pull <image>
在 ec2 上并且它可以工作。
从云形成模板中的 ec2 上的 docker hub(不是 ECR)中提取镜像是否需要任何特定设置?
我的整个CF模板供引用:
Parameters:
InstanceType:
Type: String
Default: t2.micro
Description: Enter instance size. Default is t3a.medium.
AllowedValues: # dropdown options
- t1.nano
- t1.micro
- t2.micro
Key:
Type: AWS::EC2::KeyPair::KeyName
Default: aseem-ec2-eu-west-1
Description: The key used to access the instance.
Mappings:
AmiIdForRegion:
us-east-1:
AMI: ami-04ad2567c9e3d7893
eu-west-1:
AMI: ami-09d4a659cdd8677be
Resources:
VPC:
Type: AWS::EC2::VPC
Properties:
CidrBlock: 172.34.0.0/16
EnableDnsSupport: true
EnableDnsHostnames: true
InstanceTenancy: default
Tags:
- Key: Name
Value: Linux VPC
InternetGateway:
Type: AWS::EC2::InternetGateway
VPCGatewayAttachment:
Type: AWS::EC2::VPCGatewayAttachment
Properties:
VpcId: !Ref VPC
InternetGatewayId: !Ref InternetGateway
SubnetA:
Type: AWS::EC2::Subnet
Properties:
AvailabilityZone: eu-west-1a
VpcId: !Ref VPC
CidrBlock: 172.34.1.0/24
MapPublicIpOnLaunch: true
RouteTable:
Type: AWS::EC2::RouteTable
Properties:
VpcId: !Ref VPC
InternetRoute:
Type: AWS::EC2::Route
DependsOn:
- InternetGateway
- VPCGatewayAttachment
Properties:
DestinationCidrBlock: 0.0.0.0/0
GatewayId: !Ref InternetGateway
RouteTableId: !Ref RouteTable
SubnetARouteTableAssociation:
Type: AWS::EC2::SubnetRouteTableAssociation
Properties:
RouteTableId: !Ref RouteTable
SubnetId: !Ref SubnetA
SecurityGroup:
Type: 'AWS::EC2::SecurityGroup'
Properties:
GroupDescription: Enable HTTP access via port 80
GroupName: superset-ec2-security-group-3
VpcId: !Ref VPC
SecurityGroupIngress:
- IpProtocol: tcp
FromPort: 8080 # HTTP- port 80
ToPort: 8080
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 22 # ssh
ToPort: 22
CidrIp: 0.0.0.0/0
- IpProtocol: tcp
FromPort: 443
ToPort: 443
CidrIp: 0.0.0.0/0
SecurityGroupEgress: # all external traffic
- IpProtocol: -1
CidrIp: 0.0.0.0/0
ElasticIP:
Type: AWS::EC2::EIP
Properties:
Domain: vpc
InstanceId: !Ref LinuxEc2
LinuxEc2:
Type: AWS::EC2::Instance
Properties:
SubnetId: !Ref SubnetA
SecurityGroupIds:
- !Ref SecurityGroup
ImageId: !FindInMap [ AmiIdForRegion,!Ref AWS::Region,AMI ]
KeyName: !Ref Key
InstanceType: !Ref InstanceType
BlockDeviceMappings:
- DeviceName: /dev/xvda
Ebs:
VolumeSize: 100
Tags:
- Key: Name # naming your instance
Value: superset-6
UserData:
'Fn::Base64': |
#!/bin/bash
yum -y install docker
dockerd
docker pull apache/superset
Outputs:
PublicDnsName:
Value: !GetAtt LinuxEc2.PublicDnsName
PublicIp:
Value: !GetAtt LinuxEc2.PublicIp
最佳答案
您不应该在用户数据中执行 dockerd
。这将启动 docker 守护进程并卡住进一步的执行。相反,它应该是:
UserData:
'Fn::Base64': |
#!/bin/bash
yum -y install docker
systemctl enable docker
systemctl start docker
docker pull apache/superset
关于amazon-web-services - docker pull <image> 无法在 cloudformation UserData 标签中工作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/70160658/
有没有办法 git pull 直到有东西可以 pull 。 假设我正在等待一位同事推送他的最新更改,因为我不耐烦并且没有看他的屏幕,我只是运行 watch git pull 直到我看到有东西被 pul
这个问题在这里已经有了答案: What is the difference between 'git pull' and 'git fetch'? (37 个答案) 关闭 6 年前。 这个问题我一直
我有一个分支,想使用 $ git pull origin master 将 master 中的更改 git在我这样做之后, pull 确实没有显示任何 merge 的 PR 被 pull 并且说它已经
在各个地方,寻找有关如何从 GitHub merge 请求创建本地分支的说明,我看到了两个版本: git fetch upstream refs/pull/PR_ID/head:NEW_LOCAL_B
我已经在github上创建了一个仓库。 Upstream中有一些新的 pull 请求。我想从本地上游 pull 请求。 我怎样才能做到这一点?我不知道,没有发现任何与此相关的信息。 最佳答案 通过首先
假设我 fork 一个 GitHub 项目并进行一些更改,然后为要 merge 到的更改创建 pull 请求我从中 fork 的原始项目。 一旦我这样做了,如果我返回到我的 fork 项目并提交更多文
我在 BitBucket 上有一个 Git 存储库。我有两个分支 master 和 db。在我的笔记本电脑上,我对 db 进行了更改,提交了更改并推送到 BitBucket。我可以在该分支中看到提交。
我在分支 tm-skeleton并执行 git pull 做某事(从技术上讲,它要求输入密码,然后我在那里点击了 ),但我怎么知道它从哪里 pull ?通常,[branch "tm-skeleton"
我们在组织中使用 Github 进行源代码控制。多个开发人员不断地将他们的更改 merge 到远程源存储库。就我而言,我在两周前克隆了存储库,之后进行了多次 merge 。现在我正在尝试获取代码的最新
在 merge pull 请求之前,我想在本地快速 pull 请求并运行测试并测试一些内容。我还不想点击 gihub merge pull 请求。 我认为滑轮会有所帮助 http://ejohn.or
我有一个服务器,其中有一些我不知道我在哪里的配置我只是 git pull 并获取 github 存储库中的内容,然后重新启动它以进行部署。 问题是,有一个不是我最新的提交,它实际上不在我的服务器上。这
我是 Git 的新手,所以如果这是微不足道的,我深表歉意。我有一个使用 Github 和 EGit 设置的私有(private)存储库. 要更新并 merge 我的本地存储库分支与远程版本(本质上是g
pull 请求的发起者可能 give the maintainer the ability to edit the pull request . 对于任何给定的 pull 请求,我们如何判断该能力是否
我 fork 了一个GitHub存储库,并在 fork 上进行了一些更改,然后提交了一个 pull 请求,但是原始GitHub存储库的所有者要求对它们进行 pull 请求中的一些更改。我以为在fork
如何使用 Git GUI 工具进行拉取?似乎任何地方都没有 pull 命令。 是否有使用 Git GUI 的等效菜单选项? 任何帮助将不胜感激。 最佳答案 嗯,我发现这个有用的论坛帖子: https:
我制作了一个程序来从我的 github 上托管的公共(public)存储库中提取数据。克隆一个项目工作得很好(无论如何我都是这样做的),但我一直在努力让它工作以提取所有内容,一旦你删除一个文件,它不再
哪个比另一个更可取,为什么?如果我在提交之前 pull ,其他开发人员所做的更改是否与我当前正在处理的内容 merge ?如果是这样,那意味着这个更可取? 最佳答案 最好先提交。 pull 而不提交可
我对使用 git 在团队中工作还很陌生。 我从“origin/master”开始。 首先我创建了一个新分支feature/26062018-offline-seite_ef。 我添加了提交。 我检查了
这个问题在这里已经有了答案: Retrieve specific commit from a remote Git repository (11 个答案) 关闭 9 年前。 我在本地创建一个空的新存
我开始在 Github 上使用新的 pull 请求草案功能,但我想知道在我不小心发出 pull 请求的情况下是否可以将合法的 pull 请求转换回 pull 请求草案。 最佳答案 如前所述on Twi
我是一名优秀的程序员,十分优秀!