generated from devcontainers/feature-starter
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from NafiAsib/feat/localstack
Add localstack
- Loading branch information
Showing
5 changed files
with
55 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"name": "localstack", | ||
"id": "localstack", | ||
"version": "1.0.0", | ||
"description": "LocalStack is a cloud service emulator", | ||
"installsAfter": [ | ||
"ghcr.io/devcontainers/features/common-utils" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -eax | ||
|
||
ARCH=amd64 | ||
if [ "$(uname -m)" = "aarch64" ]; then ARCH=arm64; fi | ||
|
||
install_localstack() { | ||
echo "Installing Localstack..." | ||
LATEST_VERSION=$(curl https://api.github.com/repos/localstack/localstack/releases/latest | grep -i "tag_name" | awk -F '"' '{print $4}' | sed 's/v//g') | ||
curl -Lo localstack-cli-${LATEST_VERSION}-linux-${ARCH}-onefile.tar.gz \ | ||
https://github.com/localstack/localstack-cli/releases/download/v${LATEST_VERSION}/localstack-cli-${LATEST_VERSION}-linux-${ARCH}-onefile.tar.gz | ||
tar xvzf localstack-cli-${LATEST_VERSION}-linux-*-onefile.tar.gz -C /usr/local/bin | ||
} | ||
|
||
install_localstack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -e | ||
|
||
source dev-container-features-test-lib | ||
|
||
check "user is vscode" grep vscode <(whoami) | ||
|
||
bins=( | ||
localstack | ||
) | ||
|
||
for bin in "${bins[@]}"; do | ||
check "$bin" command -v "$bin" | ||
done | ||
|
||
reportResults |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
{ | ||
"available_for_nonroot_user": { | ||
"image": "mcr.microsoft.com/devcontainers/base:ubuntu", | ||
"remoteUser": "vscode", | ||
"features": { | ||
"ghcr.io/devcontainers/features/common-utils:2": { | ||
"username": "vscode" | ||
}, | ||
"localstack": {} | ||
} | ||
} | ||
} |