The easiest way to scrap .env files and store your API keys securely on Pangea.
It is possible to install Pangea CLI directly in binary mode. In order to get it downloaded and installed follow these next steps:
brew install pangeacyber/cli/pangea
using curl
source <(curl -L https://github.com/pangeacyber/pangea-cli/releases/latest/download/download-and-install.sh)
or using wget
bash <(wget -qO- https://github.com/pangeacyber/pangea-cli/releases/latest/download/download-and-install.sh)
Using winget
, run:
winget install pangeacyber.pangea
If prefer to install directly from source code run following commands:
- Clone Pangea CLI repo and move inside its folder
git clone [email protected]:pangeacyber/pangea-cli.git
cd pangea-cli
- Run make installer (only works on macOS and linux)
make install-<OS>
Note: Replace <OS>
with macos
or linux
pangea login
Note: Follow the prompt and paste your Pangea vault token
pangea vault workspace create
pangea vault workspace select
pangea vault workspace migrate -f .env
pangea vault workspace run -c <APP_COMMAND>
# Example - pangea vault workspace run -c npm run dev
Step 1: Install the CLI in your Dockerfile
. Here's an example for a Node app
FROM node:lts-bullseye
# Install Pangea CLI
RUN sh -c "$(curl -fsSL -o pangea.tar.gz https://github.com/pangeacyber/pangea-cli/releases/download/latest/pangea-$(uname -s)-$(uname -m).tar.gz)"
RUN sh -c "mkdir installer && tar -xzvf pangea.tar.gz -C installer && cd installer"
RUN sh -c "./install.sh && cd ../"
WORKDIR /app
COPY . .
RUN npm install
ENTRYPOINT ["pangea", "vault", "workspace", "run", "-c"]
# APP Command
CMD ["npm", "run", "dev"]
Now run your docker container by passing in the PANGEA_TOKEN and PANGEA_DEFAULT_FOLDER.
docker run \
-e PANGEA_TOKEN=pts... \
-e PANGEA_DOMAIN=aws.us.pangea.cloud \
-e PANGEA_DEFAULT_FOLDER=/... \
<IMAGE_NAME>
If completion is not working on MacOS using zsh
, you could try adding this next lines to your ~/.zshrc
file
if type brew &>/dev/null
then
FPATH="$(brew --prefix)/share/zsh/site-functions:${FPATH}"
autoload -Uz compinit
compinit
fi
and then restart the terminal running:
exec $SHELL
Follow this next instructions to test installation script in multiple platforms:
Run this command to build a Linux ARM64 image and run installation script on it:
docker build -t pangea-test-linux-arm64 --platform linux/arm64 .
Run docker image and check its logs, it should show the message:
Running Pangea-CLI install script...
OS: Linux
Arch: aarch64
go build -o pangea ./cmd/main.go
Bash completion script installed successfully.
Installation success.
Run this command to build a Linux AMD64 image and run installation script on it:
docker build -t pangea-test-linux-amd64 --platform linux/amd64 .
Run docker image and check its logs, it should show the message:
Running Pangea-CLI install script...
OS: Linux
Arch: x86_64
go build -o pangea ./cmd/main.go
Bash completion script installed successfully.
Installation success.