From 044a1ff2c51ce662dc15b89cf0aaba9554b4788c Mon Sep 17 00:00:00 2001 From: bclayton-usgs <bclayton@usgs.gov> Date: Tue, 19 May 2020 13:40:44 -0600 Subject: [PATCH] update docker --- Dockerfile | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bbdca32..3552205 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,3 +1,8 @@ +#### +# Build locally: +# docker build --build-arg ssh_private_key="$(cat ~/.ssh/id_rsa)" -t nshmp-ws . +#### + # Current project ARG project=nshmp-netcdf @@ -20,17 +25,23 @@ ENV LANG="en_US.UTF-8" ARG workdir ARG libs_dir ARG jar_file +ARG ssh_private_key WORKDIR ${workdir} -RUN yum install -y java-11-openjdk which git +RUN yum install -y java-11-openjdk which git \ + && eval $(ssh-agent -s) \ + && mkdir -p ~/.ssh \ + && chmod 700 ~/.ssh \ + && echo "${ssh_private_key}" >> ~/.ssh/id_rsa \ + && chmod 0600 ~/.ssh/id_rsa \ + && echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config COPY build.gradle . COPY .git .git COPY gradle gradle COPY gradle.properties . COPY gradlew . -COPY nshmp-lib ../nshmp-lib COPY settings.gradle . COPY src src COPY openapi.properties . -- GitLab