Skip to content

Commit dce366a

Browse files
dekobonajimenez
andauthored
fix: Fixes #127 (#448)
This change hardcodes the path to `bash` when it is used within Docker. Ideally, we should be able to use `env` to locate `bash`, it seems that some container execution platforms do not support it. Invoking `bash` from the development, CI, or Ubuntu full installs will continue to use the `env` pattern. Signed-off-by: Elijah Zupancic <e.zupancic@f5.com> Co-authored-by: ajimenez <ajimenez@lendingpoint.com>
1 parent 6e2681f commit dce366a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

common/docker-entrypoint.d/00-check-for-required-env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/bash
22
#
33
# Copyright 2020 F5 Networks
44
#
@@ -44,7 +44,7 @@ elif [[ -v AWS_SESSION_TOKEN ]]; then
4444
# b) Using Instance Metadata Service (IMDS) credentials, if IMDS is present at http://169.254.169.254.
4545
# See https://docs.aws.amazon.com/sdkref/latest/guide/feature-imds-credentials.html.
4646
# Example: We are running inside an EC2 instance.
47-
elif TOKEN=`curl -X PUT --silent --fail --connect-timeout 2 --max-time 2 "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` && curl -H "X-aws-ec2-metadata-token: $TOKEN" --output /dev/null --silent --head --fail --connect-timeout 2 --max-time 5 "http://169.254.169.254"; then
47+
elif TOKEN=`curl -X PUT --silent --fail --connect-timeout 2 --max-time 2 "http://169.254.169.254/latest/api/token" -H "X-aws-ec2-metadata-token-ttl-seconds: 21600"` && curl -H "X-aws-ec2-metadata-token: $TOKEN" --output /dev/null --silent --head --fail --connect-timeout 2 --max-time 5 "http://169.254.169.254"; then
4848
echo "Running inside an EC2 instance, using IMDS for credentials"
4949

5050
# c) Using assume role credentials. This is indicated by AWS_WEB_IDENTITY_TOKEN_FILE being set.

common/docker-entrypoint.d/22-enable_js_fetch_trusted_certificate.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/usr/bin/bash
2+
13
#
24
# Copyright 2022 F5 Networks
35
#

common/docker-entrypoint.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/bash
22
#
33
# Copyright 2020 F5 Networks
44
#
@@ -71,7 +71,7 @@ fi
7171
# See documentation for this feature. We do not parse this as a boolean
7272
# since "true" and "false" are the required values of the header this populates
7373
if [ "${CORS_ALLOW_PRIVATE_NETWORK_ACCESS}" != "true" ] && [ "${CORS_ALLOW_PRIVATE_NETWORK_ACCESS}" != "false" ]; then
74-
export CORS_ALLOW_PRIVATE_NETWORK_ACCESS=""
74+
export CORS_ALLOW_PRIVATE_NETWORK_ACCESS=""
7575
fi
7676

7777
# This is the primary logic to determine the s3 host used for the

0 commit comments

Comments
 (0)