Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit 84d0f98

Browse files
authored
Merge pull request #132 from wleepang/bugfix-awscli-v2
enable awscli-v2 for containers w/o glibc
2 parents f2de6e2 + a9f48a6 commit 84d0f98

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/ecs-additions/awscli-shim.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# This shim is for using the AWS ClI v2 with containers that do not have full glibc
4+
# it makes the shared libraries the AWS CLI v2 findable via LD_LIBRARY_PATH
5+
#
6+
# expect to be installed as /opt/aws-cli/bin/aws
7+
# expect to actually call /opt/aws-cli/dist/aws
8+
# expect that /opt/aws-cli is mapped to containers
9+
10+
BIN_DIR=`dirname $0`
11+
DIST_DIR=`dirname $BIN_DIR`/dist
12+
AWS=$DIST_DIR/aws
13+
14+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$DIST_DIR
15+
16+
$AWS $@
17+

src/ecs-additions/ecs-additions-common.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@
33
# add fetch and run batch helper script
44
chmod a+x /opt/ecs-additions/fetch_and_run.sh
55
cp /opt/ecs-additions/fetch_and_run.sh /usr/local/bin
6+
7+
# add awscli-shim
8+
mv /opt/aws-cli/bin /opt/aws-cli/dist
9+
chmod a+x /opt/ecs-additions/awscli-shim.sh
10+
mkdir /opt/aws-cli/bin
11+
cp /opt/ecs-additions/awscli-shim.sh /opt/aws-cli/bin/aws
12+

0 commit comments

Comments
 (0)