From 3a2eee308c0259169ab0762bb29cecc42cddb054 Mon Sep 17 00:00:00 2001 From: Krzysztof Majewski Date: Mon, 18 Oct 2021 18:48:13 +0200 Subject: [PATCH] BAEL-5095 Dockerfile strategies for Git (#11348) Co-authored-by: majewsk6 --- docker/dockerfile-with-git/.gitmodules | 4 ++++ docker/dockerfile-with-git/Dockerfile | 13 +++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 docker/dockerfile-with-git/.gitmodules create mode 100644 docker/dockerfile-with-git/Dockerfile diff --git a/docker/dockerfile-with-git/.gitmodules b/docker/dockerfile-with-git/.gitmodules new file mode 100644 index 0000000000..aa3911dfc3 --- /dev/null +++ b/docker/dockerfile-with-git/.gitmodules @@ -0,0 +1,4 @@ +[submodule "project"] + path = project + url = https://github.com/eugenp/tutorials.git + branch = master \ No newline at end of file diff --git a/docker/dockerfile-with-git/Dockerfile b/docker/dockerfile-with-git/Dockerfile new file mode 100644 index 0000000000..91dfee3bc6 --- /dev/null +++ b/docker/dockerfile-with-git/Dockerfile @@ -0,0 +1,13 @@ +ADD . /project/ +ADD /build/ /project/ +ADD /output/project.jar /project/ + +ADD ssh-private-key /root/.ssh/id_rsa +RUN git clone git@github.com:eugenp/tutorials.git + +ARG username=$GIT_USERNAME +ARG password=$GIT_PASSWORD +RUN git clone https://username:password@github.com:eugenp/tutorials.git + +VOLUME /build/ /project/ +