From 1d20bdcfa6543888b3d1e6e66e932e1f43ff5b1e Mon Sep 17 00:00:00 2001 From: Balaji G Date: Sun, 12 Mar 2023 19:06:50 +0000 Subject: [PATCH] Added Docker file for python, build and run Added Dockerfile for Python and updated build and run instructions. The Dockerfile includes instructions for installing the necessary dependencies and setting up the environment for running the Gauge tests. The updated build and run commands use the Docker image to run the tests in an isolated and consistent environment. --- howto/ci_cd/docker.rst | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/howto/ci_cd/docker.rst b/howto/ci_cd/docker.rst index 8d49055..a0b509d 100644 --- a/howto/ci_cd/docker.rst +++ b/howto/ci_cd/docker.rst @@ -55,3 +55,30 @@ Run Gauge specs on Docker - Mount the docker image with the and run the specs in the container :highlighted-syntax:`docker run -v pwd:/ -w="/" test gauge run specs` + + +Dockerfile for Python +------------------------- + + # Install Pyhton. "You can specify the version of Python to use in the Docker image as per your preference." + + FROM python:3.10.5 + + COPY requirements.txt . + + RUN pip install --no-cache-dir -r requirements.txt + + # Install Gauge and make sure it is in the system path + + RUN wget -O - https://downloads.gauge.org/stable | sh + + ENV PATH="/usr/local/bin:${PATH}" + +Run Gauge specs on Docker (Windows) +------------------------- + +- Build the docker image tagged as test + :highlighted-syntax:`docker build . -t test` + +- Mount the docker image with the and run the specs in the container + :highlighted-syntax:`docker run --rm -v :/app test gauge run app/`