From 32a5c5238fb9b62ce9b592bf3a14c2662a7b92a3 Mon Sep 17 00:00:00 2001 From: Gyorgy Nadaban <58954625+gnadaban@users.noreply.github.com> Date: Thu, 20 Jan 2022 19:52:18 -0500 Subject: [PATCH] Fix installing default venv packages (#18) * Fix installing default venv packages * Use Bash as shell for Dockerfile --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 11c239f..b5d743a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,8 @@ FROM ubuntu:20.04 +# Use Bash shell for Python venv script +SHELL ["/bin/bash", "-c"] + # To make it easier for build and release pipelines to run apt-get, # configure apt to not require confirmation (assume the -y argument by default) ENV DEBIAN_FRONTEND=noninteractive @@ -33,6 +36,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ && python3 -m venv /ado-venv \ # Make this the default venv for root && echo "source /ado-venv/bin/activate" >> ~root/.bashrc \ +&& source /ado-venv/bin/activate \ && pip install wheel \ && pip install ansible==5.2.0 foodx-devops-tools==0.12.1 \ # Install .NETCore runtime dependency for the agent