diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile index a2f41bb..3a76b8b 100644 --- a/.gitpod.Dockerfile +++ b/.gitpod.Dockerfile @@ -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 diff --git a/.gitpod.yml b/.gitpod.yml index 2077c03..7af2378 100644 --- a/.gitpod.yml +++ b/.gitpod.yml @@ -14,6 +14,5 @@ github: prebuilds: branches: true pullRequestsFromForks: true - addComment: true addBadge: true addLabel: true diff --git a/scripts/deps.sh b/scripts/deps.sh index 479addc..56766bf 100755 --- a/scripts/deps.sh +++ b/scripts/deps.sh @@ -1,9 +1,9 @@ #!/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 @@ -11,17 +11,10 @@ if [ -z $(which kubectl) ]; then 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 @@ -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 \ No newline at end of file