Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade awscli to v2 #246

Merged
merged 2 commits into from
Feb 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 10 additions & 5 deletions aws/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
FROM chatwork/alpine-sdk:3.10
FROM amazonlinux:2

ARG AWSCLI_VERSION=1.16.259
ARG AWSCLI_VERSION=2.0.1

LABEL version="${AWSCLI_VERSION}"
LABEL maintainer="ozaki@chatwork.com"
LABEL maintainer="sakamoto@chatwork.com"

COPY entrypoint.sh /entrypoint.sh

RUN apk --no-cache add python3 py3-pip groff jq \
&& pip3 install --no-cache-dir --upgrade pip \
&& pip3 install --no-cache-dir awscli==${AWSCLI_VERSION} \
RUN yum install jq unzip -y \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& unzip awscliv2.zip \
&& ./aws/install \
&& rm -f awscliv2.zip \
&& yum clean all \
&& rm -rf /var/cache/yum/* \
&& chmod +x /entrypoint.sh

ENTRYPOINT ["/entrypoint.sh"]
2 changes: 1 addition & 1 deletion aws/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
# Delete an empty AWS environment variable
unset `env | grep '^AWS_.*=$' | sed 's/=$//'`

exec /usr/bin/aws "$@"
exec /usr/local/bin/aws "$@"
6 changes: 2 additions & 4 deletions aws/goss/goss.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
file:
/usr/bin/aws:
/usr/local/bin/aws:
exists: true
mode: "0755"
/usr/bin/jq:
exists: true
mode: "0755"
command:
/usr/bin/aws --version:
exit-status: 0
/usr/bin/aws help:
/usr/local/bin/aws --version:
exit-status: 0
/usr/bin/jq --version:
exit-status: 0
4 changes: 2 additions & 2 deletions aws/variant.lock
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
dependencies:
awscli:
version: 1.16.259
previousVersion: 1.16.256
version: 2.0.1
previousVersion: 2.0.0
2 changes: 1 addition & 1 deletion aws/variant.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ dependencies:
releasesFrom:
githubTags:
source: aws/aws-cli
version: "> 1.16.256"
version: "> 2.0.0"