Skip to content

Commit

Permalink
aws and gcloud cli
Browse files Browse the repository at this point in the history
  • Loading branch information
ksaifullah committed Apr 24, 2024
1 parent c206033 commit 7cebe05
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 5 deletions.
23 changes: 19 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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"]
3 changes: 3 additions & 0 deletions list-bucket.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/usr/bin/env bash

gcloud version
1 change: 0 additions & 1 deletion main.py

This file was deleted.

0 comments on commit 7cebe05

Please sign in to comment.