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

Add awscli to image #57

Merged
merged 2 commits into from
Oct 14, 2021
Merged
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
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}"