Files
dsk-iac/ansible/01_old/ansible_kubectl/Dockerfile
2023-12-19 13:36:16 +09:00

27 lines
695 B
Docker

# Start from Python 3.9 base image
FROM nexus2.exem-oss.org/awx-ee:latest
USER root
# Update and install dependencies
RUN yum clean all && \
yum makecache && \
yum update -y && \
yum install -y sudo nfs-utils
# Python package management
RUN pip3 uninstall -y crypto pycrypto && \
pip3 install pycryptodome hvac xlwt
# Install kubectl
RUN curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" && \
chmod +x kubectl && \
mv kubectl /usr/local/bin/
# Copy kubeconfig (Not recommended for production)
COPY kubeconfig /root/.kube/config
# Keep the container running
#CMD ["bash"]
CMD ["tail", "-f", "/dev/null"]