Skip to content
Open
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
67 changes: 65 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,52 @@
# FROM ubuntu:20.04

# ENV NVM_DIR /usr/local/nvm

# # Install all dependencies, NVM, GitHub CLI, and other tools in a single RUN command
# RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
# git \
# jq \
# unzip \
# curl \
# wget \
# tar \
# openssl \
# python3 \
# python3-pip \
# && curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
# && unzip awscliv2.zip \
# && ./aws/install \
# && curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
# && install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl \
# && curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \
# && chmod 700 get_helm.sh \
# && ./get_helm.sh \
# && git clone https://github.com/tfutils/tfenv.git ~/.tfenv \
# && pip3 install urllib3==1.26.7 print-env \
# && mkdir -p $NVM_DIR \
# && curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash \
# && . $NVM_DIR/nvm.sh \
# # Install GitHub CLI
# && curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg \
# && echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | tee /etc/apt/sources.list.d/github-cli.list > /dev/null \
# && apt update \
# && apt install gh \
# # Clean up
# && apt-get clean \
# && rm -rf /var/lib/apt/lists/* /awscliv2.zip

# # Set environment path for tfenv and NVM
# ENV PATH="/root/.tfenv/bin:$NVM_DIR/versions/node/$(nvm version)/bin:$PATH"

# # Create and set the working directory
# WORKDIR /work

# # Copy the script into the container
# COPY ./script.sh /
# RUN chmod u+x /script.sh


# Base image
FROM ubuntu:20.04

ENV NVM_DIR /usr/local/nvm
Expand All @@ -13,16 +62,30 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y \
openssl \
python3 \
python3-pip \
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" \
# Install AWS CLI based on architecture
&& ARCH=$(dpkg --print-architecture) \
&& if [ "$ARCH" = "amd64" ]; then \
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"; \
elif [ "$ARCH" = "arm64" ]; then \
curl "https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip" -o "awscliv2.zip"; \
fi \
&& unzip awscliv2.zip \
&& ./aws/install \
&& curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
# Install kubectl based on architecture
&& if [ "$ARCH" = "amd64" ]; then \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl"; \
elif [ "$ARCH" = "arm64" ]; then \
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"; \
fi \
&& install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl \
# Install Helm
&& curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 \
&& chmod 700 get_helm.sh \
&& ./get_helm.sh \
# Install tfenv
&& git clone https://github.com/tfutils/tfenv.git ~/.tfenv \
&& pip3 install urllib3==1.26.7 print-env \
# Install NVM
&& mkdir -p $NVM_DIR \
&& curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
Expand Down
Loading