Skip to content
This repository was archived by the owner on May 20, 2020. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 10 additions & 22 deletions .gitpod.Dockerfile
Original file line number Diff line number Diff line change
@@ -1,29 +1,17 @@
FROM gitpod/workspace-full

USER gitpod

RUN brew install terraform kubectl shellharden shfmt shellcheck \
&& sudo env "PATH=$PATH" bash -c "printf 'source <(kubectl completion bash)\nterraform -install-autocomplete\n' >>~/.bashrc"

WORKDIR /tmp/awscli

# Install AWS CLI
RUN sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
&& sudo unzip awscliv2.zip \
&& sudo ./aws/install \
&& cd .. \
&& sudo rm -rf awscli \
&& bash -c "printf 'complete -C '/usr/local/bin/aws_completer' aws' >> ~/.bashrc"

ENV TRIGGER_REBUILD=2
RUN brew install shellharden shfmt shellcheck
# Install aws-iam-authenticator
RUN sudo curl -o aws-iam-authenticator "https://amazon-eks.s3-us-west-2.amazonaws.com/1.13.7/2019-06-11/bin/linux/amd64/aws-iam-authenticator" \
&& sudo chmod +x ./aws-iam-authenticator \
&& sudo mkdir -p $HOME/.aws-iam \
&& sudo cp ./aws-iam-authenticator $HOME/.aws-iam/aws-iam-authenticator
RUN curl -o aws-iam-authenticator "https://amazon-eks.s3-us-west-2.amazonaws.com/1.13.7/2019-06-11/bin/linux/amd64/aws-iam-authenticator" \
&& chmod +x ./aws-iam-authenticator \
&& sudo install aws-iam-authenticator /usr/bin
# Install networking tools
RUN sudo apt-get update \
&& sudo apt-get install -yq \
tcpdump \
iputils-ping
ENV PATH=$PATH:$HOME/.aws-iam

COPY . /tmp

WORKDIR /tmp

RUN ./deps.sh
1 change: 0 additions & 1 deletion .gitpod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@ github:
prebuilds:
branches: true
pullRequestsFromForks: true
addComment: true
addBadge: true
addLabel: true
22 changes: 8 additions & 14 deletions scripts/deps.sh
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
#!/bin/bash
set -x
set -ex
if [ -z $(which helm) ]; then
wget "https://get.helm.sh/helm-v3.0.2-linux-amd64.tar.gz" \
&& tar xvf helm-v3.0.2-linux-amd64.tar.gz \
&& sudo mv linux-amd64/helm /usr/local/bin/
&& sudo install linux-amd64/helm /usr/local/bin/
fi
if [ -z $(which kubectl) ]; then
sudo apt-get install -y apt-transport-https
curl -s "https://packages.cloud.google.com/apt/doc/apt-key.gpg" | sudo apt-key add -
echo "deb https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl
printf '\nsource <(kubectl completion bash)\n' >>~/.bashrc
fi
if [ -z $(which aws) ]; then
cd /tmp
sudo mkdir awscli
cd awscli
sudo curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
sudo unzip awscliv2.zip \
sudo ./aws/install
cd ..
sudo rm -rf awscli
bash -c "echo \"complete -C '/usr/local/bin/aws_completer' aws\" > ~/.bashrc"
brew install awscli
fi
if [ -z $(which terraform) ]; then
cd /tmp
Expand All @@ -30,9 +23,10 @@ if [ -z $(which terraform) ]; then
sudo apt-get install unzip
sudo wget "https://releases.hashicorp.com/terraform/0.12.18/terraform_0.12.18_linux_amd64.zip"
sudo unzip terraform_0.12.18_linux_amd64.zip
cd ..
sudo rm -rf terraform
chmod +x terraform
sudo install terraform /usr/bin
printf '\nterraform -install-autocomplete &>/dev/null\n' >>~/.bashrc
fi
if [ -z $(which git) ]; then
sudo apt-get install -y git
fi
fi