Skip to content

Commit

Permalink
Use ansible-core to bring image size down to ~550mb
Browse files Browse the repository at this point in the history
  • Loading branch information
ttuffin committed Aug 25, 2023
1 parent 733aef7 commit 7901005
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,13 @@ RUN useradd -u $USER_ID -d $APP_DIR appuser
WORKDIR $APP_DIR
COPY . $WORKDIR
RUN chown -R $USER_ID $APP_DIR

RUN dnf install -y java-17-openjdk-devel python3-pip

USER $USER_ID
ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk
ENV PATH="${PATH}:$APP_DIR/.local/bin"
RUN pip install -U pip \
&& pip install ansible \
&& pip install ansible-core \
ansible-runner \
jmespath \
asyncio \
Expand All @@ -26,5 +28,4 @@ RUN pip install -U pip \
RUN bash -c "if [ $DEVEL_COLLECTION_LIBRARY -ne 0 ]; then \
ansible-galaxy collection install git+https://github.com/ansible/event-driven-ansible.git --force; fi"

USER $USER_ID
RUN pip install .

0 comments on commit 7901005

Please sign in to comment.