update dockerfile

This commit is contained in:
Matt Reeves 2025-01-13 01:51:25 -05:00
parent 974c60e9af
commit 6dc12d09bf

View file

@ -1,3 +1,4 @@
# Base image
FROM willhallonline/ansible:2.17-ubuntu-24.04
# Remove externally managed Python restriction
@ -7,18 +8,18 @@ RUN rm -rf /usr/lib/python3.12/EXTERNALLY-MANAGED
RUN pip install --no-cache-dir bitwarden-sdk
# Install Ansible collections
RUN ansible-galaxy collection install bitwarden.secrets
RUN ansible-galaxy collection install community.docker
RUN ansible-galaxy collection install bitwarden.secrets \
&& ansible-galaxy collection install community.docker \
&& ansible-galaxy collection install community.general
# Install required packages and dependencies
RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y --no-install-recommends \
libssl3 \
curl \
git \
nodejs \
&& apt-get clean
&& apt-get clean && rm -rf /var/lib/apt/lists/*
# Install Rust using rustup
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# Ensure Rust binaries are added to the PATH
@ -27,8 +28,11 @@ ENV PATH="/root/.cargo/bin:${PATH}"
# Install the bws tool using Cargo
RUN cargo install bws
# Set PYTHONPATH for custom Python package locations
ENV PYTHONPATH=/usr/local/lib/python3.12/dist-packages:${PYTHONPATH}
# Set the working directory
WORKDIR /ansible
# Default command
CMD [ "ansible-playbook", "--version" ]