Skip to content

Commit 309a620

Browse files
author
Sean Sundberg
authored
Simplify cli install logic and fix build workflow (#32)
Signed-off-by: Sean Sundberg <seansund@us.ibm.com>
1 parent 9d170e3 commit 309a620

3 files changed

Lines changed: 32 additions & 29 deletions

File tree

.github/workflows/docker-build.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ jobs:
2020
- alpine
2121
- fedora
2222
terraform:
23-
- v1.0
24-
- v1.1
25-
- v1.2
23+
- v1.6
24+
- v1.7
25+
- v1.8
26+
- v1.9
2627

2728
env:
28-
TERRAFORM_LATEST: "v1.2"
29+
TERRAFORM_LATEST: "v1.9"
2930

3031
steps:
3132
- name: Checkout
@@ -86,25 +87,25 @@ jobs:
8687
fi
8788
8889
echo "Short terraform: ${SHORT_TERRAFORM}"
89-
echo "::set-output name=terraform::$SHORT_TERRAFORM"
90+
echo "terraform=$SHORT_TERRAFORM" >> $GITHUB_OUTPUT
9091
9192
echo "Short tag enabled: $SHORT_TAG_ENABLED"
92-
echo "::set-output name=short-enabled::$SHORT_TAG_ENABLED"
93+
echo "short-enabled=$SHORT_TAG_ENABLED" >> $GITHUB_OUTPUT
9394
9495
echo "Release tag: ${RELEASE_TAG}"
95-
echo "::set-output name=release-tag::$RELEASE_TAG"
96+
echo "release-tag=$RELEASE_TAG" >> $GITHUB_OUTPUT
9697
9798
echo "Release tag enabled: $RELEASE_TAG_ENABLED"
98-
echo "::set-output name=release-tag-enabled::$RELEASE_TAG_ENABLED"
99+
echo "release-tag-enabled=$RELEASE_TAG_ENABLED" >> $GITHUB_OUTPUT
99100
100101
echo "Release tag short enabled: $RELEASE_TAG_SHORT_ENABLED"
101-
echo "::set-output name=release-tag-short-enabled::$RELEASE_TAG_SHORT_ENABLED"
102+
echo "release-tag-short-enabled=$RELEASE_TAG_SHORT_ENABLED" >> $GITHUB_OUTPUT
102103
103104
echo "Base enabled: $BASE_ENABLED"
104-
echo "::set-output name=base-enabled::$BASE_ENABLED"
105+
echo "base-enabled=$BASE_ENABLED" >> $GITHUB_OUTPUT
105106
106107
echo "Latest enabled: $LATEST_ENABLED"
107-
echo "::set-output name=latest-enabled::$LATEST_ENABLED"
108+
echo "latest-enabled=$LATEST_ENABLED" >> $GITHUB_OUTPUT
108109
109110
- name: Docker CNTK meta ${{ matrix.base }}:${{ matrix.terraform }}
110111
id: cntk-meta

Containerfile-alpine

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
ARG TERRAFORM_VERSION=v1.2
2-
FROM quay.io/cloudnativetoolkit/cli-tools-core:${TERRAFORM_VERSION}-v1.6.1-alpine
1+
ARG TERRAFORM_VERSION=v1.9
2+
FROM quay.io/cloudnativetoolkit/cli-tools-core:${TERRAFORM_VERSION}-v2.0.2-alpine
33

44
ARG TARGETPLATFORM
55

6+
USER root
7+
68
## AWS cli
7-
RUN sudo apk add --no-cache \
8-
python3 \
9-
py3-pip \
10-
&& sudo pip3 install --upgrade pip \
11-
&& sudo pip3 install awscli \
12-
&& sudo rm -rf /var/cache/apk/* \
13-
&& aws --version
9+
RUN apk add --no-cache --force-broken-world \
10+
aws-cli && \
11+
rm -rf /var/cache/apk/* && \
12+
aws --version
13+
14+
USER devops

Containerfile-fedora

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
1-
ARG TERRAFORM_VERSION=v1.2
2-
FROM quay.io/cloudnativetoolkit/cli-tools-core:${TERRAFORM_VERSION}-v1.6.1-fedora
1+
ARG TERRAFORM_VERSION=v1.9
2+
FROM quay.io/cloudnativetoolkit/cli-tools-core:${TERRAFORM_VERSION}-v2.0.2-fedora
33

44
ARG TARGETPLATFORM
55

6+
USER root
7+
68
## AWS cli
7-
RUN sudo dnf install -y \
8-
python3 \
9-
python3-pip \
10-
&& sudo pip3 install --upgrade pip \
11-
&& sudo pip3 install awscli \
12-
&& sudo dnf clean all \
13-
&& aws --version
9+
RUN dnf install -y \
10+
awscli && \
11+
dnf clean all && \
12+
aws --version
13+
14+
USER devops

0 commit comments

Comments
 (0)