我正在尝试在aws ecr中标记旧图像。
虽然亚马逊提供有retag图片的帮助,但这些图片是现有标记。如何使用imageDigest标记图像。例如,如何使用“imageDigest”标记下面的最后一张图片:“sha256:9f61b77c31 ...”到“dev”
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Lab_4_Part_2_
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void btnCalculate_Click(object sender, EventArgs e)
{
//Set input and output to floating decimal
double taxable = Convert.ToInt32(txtTaxable.Text);
GetTax(taxable);
}
private void EnterNum(double taxable)
{
throw new NotImplementedException();
}
private double GetTax(double taxable)
{
if (taxable <= 9225) return (taxable * 1.1);
if (taxable > 9225 | taxable < 37450) return (922.50 + (taxable * 1.15));
if (taxable > 37450 | taxable < 90750) return (5156.25 + (taxable * 1.25));
if (taxable > 90750 | taxable < 189300) return (18481.25 + (taxable * 1.28));
if (taxable > 189300 | taxable < 411500) return (46075.25 + (taxable * 1.33));
if (taxable > 411500 | taxable < 413200) return (119401.25 + taxable * 1.35);
if (taxable > 413200) return (119996.25 + (taxable * 1.396));
}
public string DisplayTaxable(double taxable)
{
return txtOwed.Text;
}
}
}
答案 0 :(得分:2)
aws ecr batch-get-image
可以选择将imageDigest而不是imageTag用于图片ID:--image-ids imageDigest=
例如:
MANIFEST=$(aws ecr batch-get-image --repository-name amazonlinux --image-ids imageDigest="sha256:xxx" --query "images[].imageManifest" --output text)