diff --git a/DINDAgent/Dockerfile b/DINDAgent/Dockerfile index 7ced074..810e1fd 100644 --- a/DINDAgent/Dockerfile +++ b/DINDAgent/Dockerfile @@ -3,7 +3,7 @@ FROM git.zontreck.com/ariascreations/buildenvironments:debianbuild ENV DOCKER_AGENT_SECRET NAN ENV DOCKER_USER NAN ENV DOCKER_PASSWORD NAN -ENV HOME /home/builder +ENV HOME /root RUN apt-get update && apt-get upgrade -y @@ -17,10 +17,8 @@ WORKDIR / RUN curl -sO https://ci.zontreck.com/jnlpJars/agent.jar -RUN useradd -m -s /bin/bash builder RUN mkdir /builder -RUN chown builder:builder /builder -USER builder +USER root ENTRYPOINT ["/bin/bash", "/entrypoint.sh"] \ No newline at end of file diff --git a/DINDAgent/entrypoint.sh b/DINDAgent/entrypoint.sh index 4be9899..653046d 100644 --- a/DINDAgent/entrypoint.sh +++ b/DINDAgent/entrypoint.sh @@ -3,10 +3,10 @@ if [ -d /keys ] then echo "Installing SSH Keys..." - mkdir -pv /home/builder/.ssh - cp -v /keys/id_rsa ~/.ssh/ - cp -v /keys/id_rsa.pub ~/.ssh/ - chmod 0600 ~/.ssh/id_rsa + mkdir -pv $HOME/.ssh + cp -v /keys/id_rsa $HOME/.ssh/ + cp -v /keys/id_rsa.pub $HOME/.ssh/ + chmod 0600 $HOME/.ssh/id_rsa sleep 10 fi