Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added Docker file for python, build and run #337

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions howto/ci_cd/docker.rst
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,30 @@ Run Gauge specs on Docker

- Mount the docker image with the <project_directory> and run the specs in the container
:highlighted-syntax:`docker run -v pwd:/<project_directory> -w="/<project_directory>" 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 <project_directory> and run the specs in the container
:highlighted-syntax:`docker run --rm -v <project_directory>:/app test gauge run app/<spec_directory>`