Skip to content

Commit

Permalink
Merge pull request #57 from CMSgov/add-aws-cli
Browse files Browse the repository at this point in the history
Add awscli to image
  • Loading branch information
crbudzeak authored Oct 14, 2021
2 parents b57f349 + 198c1d1 commit 2a69434
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set -ex
apt-get update
apt-get -qq -y install --no-install-recommends \
ca-certificates curl tar git \
libyaml-dev build-essential jq uuid-runtime
libyaml-dev build-essential jq uuid-runtime \
unzip

# Install our user and create directory to install actions-runner and the hostedtoolcache
addgroup --gid 1000 "${RUNGROUP}" && adduser --uid 1000 --ingroup "${RUNGROUP}" --shell /bin/bash "${RUNUSER}"
Expand All @@ -24,6 +25,20 @@ tar xzf "./actions-runner-linux-x64-${ACTIONS_VERSION}.tar.gz"
# Install .Net Core 3.x Linux Dependencies
./bin/installdependencies.sh

# Install awscliv2
curl -sL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip
unzip awscliv2.zip
./aws/install

# Cleanup archive debris and unnecessary items to reduce image size
rm -rf \
awscliv2.zip \
aws \
/usr/local/aws-cli/v2/*/dist/aws_completer \
/usr/local/aws-cli/v2/*/dist/awscli/data/ac.index \
/usr/local/aws-cli/v2/*/dist/awscli/examples \
"actions-runner-linux-x64-${ACTIONS_VERSION}.tar.gz"

# give privileges to our user
chown -R "${RUNUSER}":"${RUNGROUP}" "/opt/hostedtoolcache"
chown -R "${RUNUSER}":"${RUNGROUP}" "/home/${RUNUSER}"

0 comments on commit 2a69434

Please sign in to comment.