File tree Expand file tree Collapse file tree
templates/aws/microvm-agent Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ RUN dnf install -y \
1212 && setsid --version \
1313 && seq 1 1
1414
15- RUN curl -fsSL https://cli.github.com/packages/rpm/gh-cli.repo \
16- -o /etc/yum.repos.d/gh-cli.repo \
17- && dnf install -y gh-2.97.0-1 \
18- && dnf clean all \
15+ RUN GH_VERSION=2.97.0 \
16+ && GH_SHA256=73ea440ecad9c9e284429997ee6f93577bc6f7bc6fba357ef62c53ad8fb641a5 \
17+ && curl -fsSL "https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_arm64.tar.gz" -o /tmp/gh.tgz \
18+ && echo "${GH_SHA256} /tmp/gh.tgz" | sha256sum -c - \
19+ && tar -xzf /tmp/gh.tgz -C /usr/local/bin --strip-components=2 "gh_${GH_VERSION}_linux_arm64/bin/gh" \
20+ && rm /tmp/gh.tgz \
1921 && gh --version
2022
2123RUN curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-aarch64-2.36.5.zip" -o /tmp/awscliv2.zip \
Original file line number Diff line number Diff line change @@ -12,10 +12,12 @@ RUN dnf install -y \
1212 && setsid --version \
1313 && seq 1 1
1414
15- RUN curl -fsSL https://cli.github.com/packages/rpm/gh-cli.repo \
16- -o /etc/yum.repos.d/gh-cli.repo \
17- && dnf install -y gh-2.97.0-1 \
18- && dnf clean all \
15+ RUN GH_VERSION=2.97.0 \
16+ && GH_SHA256=73ea440ecad9c9e284429997ee6f93577bc6f7bc6fba357ef62c53ad8fb641a5 \
17+ && curl -fsSL "https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_arm64.tar.gz" -o /tmp/gh.tgz \
18+ && echo "${GH_SHA256} /tmp/gh.tgz" | sha256sum -c - \
19+ && tar -xzf /tmp/gh.tgz -C /usr/local/bin --strip-components=2 "gh_${GH_VERSION}_linux_arm64/bin/gh" \
20+ && rm /tmp/gh.tgz \
1921 && gh --version
2022
2123RUN curl -fsSL "https://awscli.amazonaws.com/awscli-exe-linux-aarch64-2.36.5.zip" -o /tmp/awscliv2.zip \
Original file line number Diff line number Diff line change @@ -12,7 +12,15 @@ test("the canonical and packaged MicroVM Dockerfiles stay snapshot-safe and exec
1212 ) ;
1313 assert . match ( canonical , / ^ F R O M p u b l i c \. e c r \. a w s \/ l a m b d a \/ m i c r o v m s : a l 2 0 2 3 - m i n i m a l @ s h a 2 5 6 : [ a - f 0 - 9 ] { 64 } $ / m) ;
1414 assert . match ( canonical , / d n f i n s t a l l - y [ \s \\ ] + c u r l - m i n i m a l \b / ) ;
15- assert . match ( canonical , / d n f i n s t a l l - y g h - \d + \. \d + \. \d + - \d + / ) ;
15+ assert . doesNotMatch ( canonical , / c l i \. g i t h u b \. c o m \/ p a c k a g e s \/ r p m / ) ;
16+ assert . doesNotMatch ( canonical , / d n f i n s t a l l - y g h - / ) ;
17+ assert . match ( canonical , / G H _ V E R S I O N = \d + \. \d + \. \d + / ) ;
18+ assert . match ( canonical , / G H _ S H A 2 5 6 = [ a - f 0 - 9 ] { 64 } / ) ;
19+ assert . match (
20+ canonical ,
21+ / g i t h u b \. c o m \/ c l i \/ c l i \/ r e l e a s e s \/ d o w n l o a d \/ v \$ \{ G H _ V E R S I O N \} \/ g h _ \$ \{ G H _ V E R S I O N \} _ l i n u x _ a r m 6 4 \. t a r \. g z / ,
22+ ) ;
23+ assert . match ( canonical , / \$ \{ G H _ S H A 2 5 6 \} { 2 } \/ t m p \/ g h \. t g z " \| s h a 2 5 6 s u m - c - / ) ;
1624 assert . match ( canonical , / a w s c l i - e x e - l i n u x - a a r c h 6 4 - \d + \. \d + \. \d + \. z i p / ) ;
1725 assert . match ( canonical , / [ a - f 0 - 9 ] { 64 } { 2 } \/ t m p \/ a w s c l i v 2 \. z i p " \| s h a 2 5 6 s u m - c - / ) ;
1826 assert . match ( canonical , / r p m - q o p e n s s l - s n a p s a f e - l i b s / ) ;
You can’t perform that action at this time.
0 commit comments