2024-12-03 07:56:42 +00:00
|
|
|
FROM ubuntu:24.04@sha256:80dd3c3b9c6cecb9f1667e9290b3bc61b78c2678c02cbdae5f0fea92cc6734ab
|
2023-03-24 15:24:51 +00:00
|
|
|
|
2023-06-06 16:17:23 +00:00
|
|
|
RUN apt-get update && apt-get install -y sudo git curl apt-transport-https ca-certificates gnupg-agent software-properties-common
|
2023-03-24 15:24:51 +00:00
|
|
|
ARG USERNAME=root
|
|
|
|
RUN echo $USERNAME ALL=\(root\) NOPASSWD:ALL > /etc/sudoers.d/$USERNAME \
|
|
|
|
&& chmod 0440 /etc/sudoers.d/$USERNAME
|
|
|
|
|
2023-06-06 16:17:23 +00:00
|
|
|
# Install Golang
|
2023-10-19 07:47:31 +00:00
|
|
|
RUN ARCH="$(dpkg --print-architecture)"; \
|
|
|
|
curl -LO https://dl.google.com/go/go1.21.3.linux-$ARCH.tar.gz \
|
|
|
|
&& tar -C /usr/local -xzf go1.21.3.linux-$ARCH.tar.gz \
|
|
|
|
&& rm go1.21.3.linux-$ARCH.tar.gz \
|
2023-06-06 16:17:23 +00:00
|
|
|
&& echo 'export PATH=$PATH:/usr/local/go/bin' >> /etc/profile
|
|
|
|
|
|
|
|
# Install Docker
|
|
|
|
# Install Docker
|
|
|
|
RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
|
|
|
|
RUN echo \
|
2023-10-19 07:47:31 +00:00
|
|
|
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
|
2023-10-16 15:12:01 +00:00
|
|
|
$(lsb_release -cs) stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
|
2023-06-06 16:17:23 +00:00
|
|
|
RUN apt-get update && apt-get install -y docker-ce docker-ce-cli containerd.io
|
|
|
|
|
|
|
|
# Install kubectl and Minikube
|
2023-10-19 07:47:31 +00:00
|
|
|
RUN ARCH="$(dpkg --print-architecture)"; \
|
|
|
|
curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/$ARCH/kubectl \
|
2023-06-06 16:17:23 +00:00
|
|
|
&& chmod +x kubectl && mv kubectl /usr/local/bin/ \
|
2023-10-19 07:47:31 +00:00
|
|
|
&& curl -LO https://storage.googleapis.com/minikube/releases/latest/minikube-linux-$ARCH \
|
|
|
|
&& install minikube-linux-$ARCH /usr/local/bin/minikube \
|
2023-06-06 16:17:23 +00:00
|
|
|
&& minikube config set driver docker
|
|
|
|
|
|
|
|
# Expose ports for Minikube and Docker
|
|
|
|
EXPOSE 22 80 2375 8443
|
2023-03-24 15:24:51 +00:00
|
|
|
|
2023-06-06 16:17:23 +00:00
|
|
|
CMD ["/bin/bash"]
|