File tree Expand file tree Collapse file tree 6 files changed +28
-4
lines changed
1-missing-network-configuration
4-ls-in-network-not-target Expand file tree Collapse file tree 6 files changed +28
-4
lines changed Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ set -eou pipefail
66# _without_ using docker networking. Set up an application container that tries
77# to access LocalStack but cannot.
88
9+ if test -z ${LOCALSTACK_AUTH_TOKEN:- } ; then
10+ echo " Error: must set LOCALSTACK_AUTH_TOKEN" >&2
11+ exit 1
12+ fi
13+
914ROOT_DIR=$( dirname $( readlink -f $0 ) )
1015pushd $ROOT_DIR > /dev/null
1116trap " popd >/dev/null" EXIT
@@ -19,7 +24,7 @@ docker build -t $APPLICATION_IMAGE_NAME .
1924# start localstack
2025docker rm -f $LOCALSTACK_CONTAINER_NAME 2> /dev/null || true
2126# NOTE: publishing the port is required for the CDK deployment :(
22- docker run --rm -it -d --name $LOCALSTACK_CONTAINER_NAME -v /var/run/docker.sock:/var/run/docker.sock -p 4566:4566 localstack/localstack
27+ docker run --rm -it -d --name $LOCALSTACK_CONTAINER_NAME -v /var/run/docker.sock:/var/run/docker.sock -p 4566:4566 -e LOCALSTACK_AUTH_TOKEN= $LOCALSTACK_AUTH_TOKEN localstack/localstack-pro
2328# wait for ls to be up
2429echo " Waiting for LocalStack to be ready" >&2
2530while true ; do
Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ version: "3.8"
22
33services :
44 localstack :
5- image : localstack/localstack
5+ image : localstack/localstack-pro
66 ports :
77 - " 127.0.0.1:4566:4566"
88 volumes :
99 - /var/run/docker.sock:/var/run/docker.sock
10+ environment :
11+ - LOCALSTACK_AUTH_TOKEN=$LOCALSTACK_AUTH_TOKEN
1012
1113 application :
1214 build : .
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ set -eou pipefail
66# _without_ using docker networking. Set up an application container that tries
77# to access LocalStack but cannot.
88
9+ if test -z ${LOCALSTACK_AUTH_TOKEN:- } ; then
10+ echo " Error: must set LOCALSTACK_AUTH_TOKEN" >&2
11+ exit 1
12+ fi
13+
914ROOT_DIR=$( dirname $( readlink -f $0 ) )
1015pushd $ROOT_DIR > /dev/null
1116trap " popd >/dev/null" EXIT
Original file line number Diff line number Diff line change @@ -2,11 +2,13 @@ version: "3.8"
22
33services :
44 localstack :
5- image : localstack/localstack
5+ image : localstack/localstack-pro
66 ports :
77 - " 127.0.0.1:4566:4566"
88 volumes :
99 - /var/run/docker.sock:/var/run/docker.sock
10+ environment :
11+ - LOCALSTACK_AUTH_TOKEN=$LOCALSTACK_AUTH_TOKEN
1012
1113 application :
1214 build : .
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ set -eou pipefail
66# _without_ using docker networking. Set up an application container that tries
77# to access LocalStack but cannot.
88
9+ if test -z ${LOCALSTACK_AUTH_TOKEN:- } ; then
10+ echo " Error: must set LOCALSTACK_AUTH_TOKEN" >&2
11+ exit 1
12+ fi
13+
914ROOT_DIR=$( dirname $( readlink -f $0 ) )
1015pushd $ROOT_DIR > /dev/null
1116trap " popd >/dev/null" EXIT
Original file line number Diff line number Diff line change @@ -6,6 +6,11 @@ set -eou pipefail
66# _without_ using docker networking. Set up an application container that tries
77# to access LocalStack but cannot.
88
9+ if test -z ${LOCALSTACK_AUTH_TOKEN:- } ; then
10+ echo " Error: must set LOCALSTACK_AUTH_TOKEN" >&2
11+ exit 1
12+ fi
13+
914ROOT_DIR=$( dirname $( readlink -f $0 ) )
1015pushd $ROOT_DIR > /dev/null
1116trap " popd >/dev/null" EXIT
@@ -21,7 +26,7 @@ docker build -t $APPLICATION_IMAGE_NAME .
2126# start localstack
2227docker rm -f $LOCALSTACK_CONTAINER_NAME 2> /dev/null || true
2328# NOTE: publishing the port is required for the CDK deployment :(
24- docker run --rm -it -d --name $LOCALSTACK_CONTAINER_NAME -v /var/run/docker.sock:/var/run/docker.sock --network $NETWORK_NAME -p 4566:4566 localstack/localstack
29+ docker run --rm -it -d --name $LOCALSTACK_CONTAINER_NAME -v /var/run/docker.sock:/var/run/docker.sock --network $NETWORK_NAME -e LOCALSTACK_AUTH_TOKEN= $LOCALSTACK_AUTH_TOKEN - p 4566:4566 localstack/localstack-pro
2530# wait for ls to be up
2631echo " Waiting for LocalStack to be ready" >&2
2732while true ; do
You can’t perform that action at this time.
0 commit comments