diff --git a/Dockerfile b/Dockerfile index beb11dc..a2f36cc 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,22 @@ -FROM python:slim +FROM --platform=linux/amd64 amazonlinux:latest -WORKDIR /opt/code +RUN yum update -y && \ + yum install -y gzip tar unzip -COPY main.py . +WORKDIR /opt/cli -CMD ["python", "main.py"] +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ + unzip awscliv2.zip && \ + ./aws/install + +RUN curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-cli-472.0.0-linux-x86_64.tar.gz && \ + tar -xf google-cloud-cli-472.0.0-linux-x86_64.tar.gz && \ + ./google-cloud-sdk/install.sh --usage-reporting=false --command-completion=false --path-update=false --quiet + +ENV PATH="/opt/cli/google-cloud-sdk/bin:$PATH" + +WORKDIR /opt/app + +COPY list-bucket.sh . + +CMD ["gcloud", "version"] diff --git a/list-bucket.sh b/list-bucket.sh new file mode 100755 index 0000000..dd4e3fc --- /dev/null +++ b/list-bucket.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash + +gcloud version diff --git a/main.py b/main.py deleted file mode 100644 index f301245..0000000 --- a/main.py +++ /dev/null @@ -1 +0,0 @@ -print("Hello World!")