Created
July 12, 2023 13:27
-
-
Save mshakhomirov/fe6b1b5c66d5fdfa4519e24874d2715b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Base image | |
# tar -czvf awsgcpdocker4.tar.gz Dockerfile | |
FROM gcr.io/educative-exec-env/educative-ubuntu-microvm:latest | |
# Installing prerequisite packages | |
RUN DEBIAN_FRONTEND="noninteractive" apt-get update && apt-get install -y tzdata keyboard-configuration | |
RUN apt-get -y install curl unzip groff less zip git apt-transport-https ca-certificates gnupg | |
# AWS CLI installation commands | |
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | |
RUN unzip awscliv2.zip && ./aws/install | |
# Installing different modules | |
RUN apt update && apt install -y software-properties-common &&\ | |
add-apt-repository ppa:deadsnakes/ppa &&\ | |
apt install -y python3.8 &&\ | |
apt-get install -y python3-distutils python3-apt &&\ | |
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py && python3 get-pip.py &&\ | |
pip3 install virtualenv==20.17.1 google-auth==2.15.0 google-cloud-bigquery==3.4.0 pyyaml==6.0 python-lambda-local==0.1.13 boto3==1.9.202 moto==4.0.12 pytest==5.3.5 pytz==2023.3 pymysql==1.0.3 | |
# Install gcloud-cli | |
RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key --keyring /usr/share/keyrings/cloud.google.gpg add - && apt-get update -y && apt-get install google-cloud-cli -y | |
# RUN echo "deb [signed-by=/usr/share/keyrings/cloud.google.gpg] http://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list && curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | tee /usr/share/keyrings/cloud.google.gpg && apt-get update -y && apt-get install google-cloud-sdk -y | |
# Install docker | |
# This didn't work: | |
# RUN install -m 0755 -d /etc/apt/keyrings &&\ | |
# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg &&\ | |
# chmod a+r /etc/apt/keyrings/docker.gpg &&\ | |
# echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null | |
# RUN apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin | |
# This didn't work either: | |
# RUN apt install apt-transport-https ca-certificates curl software-properties-common # already installed | |
# RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - | |
# RUN add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" | |
# RUN apt-cache policy docker-ce | |
# RUN apt install docker-ce | |
#sudo systemctl status docker |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment