From c3c495feb3b6d7af9822cdf4ec55ab3371328af5 Mon Sep 17 00:00:00 2001 From: Djalim Simaila Date: Thu, 21 Dec 2023 10:12:24 +0100 Subject: [PATCH] docker files --- Dockerfile | 6 ++++++ JenkinsDockerfile | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 Dockerfile create mode 100644 JenkinsDockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..7211e55 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,6 @@ +FROM python:3.6-slim +COPY . /python-test-calculator +WORKDIR /python-test-calculator +RUN pip install --no-cache-dir -r requirements.txt +RUN ["pytest", "-v", "--junitxml=reports/result.xml"] +CMD tail -f /dev/nul diff --git a/JenkinsDockerfile b/JenkinsDockerfile new file mode 100644 index 0000000..006e165 --- /dev/null +++ b/JenkinsDockerfile @@ -0,0 +1,16 @@ +FROM jenkins/jenkins:lts +USER root +RUN apt-get update -qq \ + && apt-get install -qqy apt-transport-https ca-certificates \ + curl gnupg2 software-properties-common + +RUN curl -fsSL https://download.docker.com/linux/debian/gpg \ + | apt-key add - + +RUN add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/debian \ + $(lsb_release -cs) \ + stable" + +RUN apt-get update -qq \ + && apt-get install docker-ce=17.12.1~ce-0~debian -y