Skip to content

Commit

Permalink
chore: Improve mounting of files in shell container
Browse files Browse the repository at this point in the history
  • Loading branch information
niallthomson committed Oct 1, 2024
1 parent 308cdc9 commit 70c69aa
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
2 changes: 1 addition & 1 deletion hack/shell.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ if [ ! -z "$DOCKER_DNS_OVERRIDE" ]; then
fi

$CONTAINER_CLI run --rm $interactive_args $dns_args \
-v $SCRIPT_DIR/../manifests:/manifests \
-v $SCRIPT_DIR/../manifests:/eks-workshop/manifests \
-v $SCRIPT_DIR/../cluster:/cluster \
-e 'EKS_CLUSTER_NAME' -e 'AWS_REGION' \
$aws_credential_args $container_image $shell_command
12 changes: 4 additions & 8 deletions lab/bin/reset-environment
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,11 @@ catch() {

mkdir -p /eks-workshop

rm -f /home/ec2-user/environment/eks-workshop

rm -rf $manifests_path

REPOSITORY_REF=${REPOSITORY_REF:-""}

if [ ! -z "${REPOSITORY_REF}" ]; then
rm -f /home/ec2-user/environment/eks-workshop
rm -rf $manifests_path
rm -rf $repository_path

logmessage "Refreshing copy of workshop repository from GitHub..."
Expand All @@ -68,11 +66,9 @@ if [ ! -z "${REPOSITORY_REF}" ]; then
logmessage ""

cp -R $repository_path/manifests $manifests_path
elif [ -d "/manifests" ]; then
cp -R /manifests $manifests_path
fi

ln -s $manifests_path /home/ec2-user/environment/eks-workshop
ln -s $manifests_path /home/ec2-user/environment/eks-workshop
fi

if [ ! -z "$module" ]; then
ANALYTICS_ENDPOINT=${ANALYTICS_ENDPOINT:-""}
Expand Down
2 changes: 2 additions & 0 deletions lab/scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ set -e

bash /tmp/setup.sh

ln -s /eks-workshop/manifests /home/ec2-user/environment/eks-workshop

if [ ! -z "$EKS_CLUSTER_NAME" ]; then
aws eks update-kubeconfig --name $EKS_CLUSTER_NAME
fi
Expand Down

0 comments on commit 70c69aa

Please sign in to comment.