diff --git a/docker/Dockerfile.linux.amd64 b/docker/Dockerfile.linux.amd64 index d8f602f..6ffe938 100644 --- a/docker/Dockerfile.linux.amd64 +++ b/docker/Dockerfile.linux.amd64 @@ -1,4 +1,4 @@ -FROM alpine:3.13 +FROM alpine:3.12 RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl aws-cli ADD posix/* /usr/local/bin/ diff --git a/docker/Dockerfile.linux.arm b/docker/Dockerfile.linux.arm index 6003c38..faf6927 100644 --- a/docker/Dockerfile.linux.arm +++ b/docker/Dockerfile.linux.arm @@ -1,4 +1,4 @@ -FROM arm32v6/alpine:3.13 +FROM arm32v6/alpine:3.12 RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl ADD posix/* /usr/local/bin/ diff --git a/docker/Dockerfile.linux.arm6 b/docker/Dockerfile.linux.arm6 index 6003c38..faf6927 100644 --- a/docker/Dockerfile.linux.arm6 +++ b/docker/Dockerfile.linux.arm6 @@ -1,4 +1,4 @@ -FROM arm32v6/alpine:3.13 +FROM arm32v6/alpine:3.12 RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl ADD posix/* /usr/local/bin/ diff --git a/docker/Dockerfile.linux.arm64 b/docker/Dockerfile.linux.arm64 index d415727..16672d5 100644 --- a/docker/Dockerfile.linux.arm64 +++ b/docker/Dockerfile.linux.arm64 @@ -1,4 +1,4 @@ -FROM arm64v8/alpine:3.13 +FROM arm64v8/alpine:3.12 RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl ADD posix/* /usr/local/bin/ diff --git a/docker/Dockerfile.linux.arm7 b/docker/Dockerfile.linux.arm7 index 6003c38..faf6927 100644 --- a/docker/Dockerfile.linux.arm7 +++ b/docker/Dockerfile.linux.arm7 @@ -1,4 +1,4 @@ -FROM arm32v6/alpine:3.13 +FROM arm32v6/alpine:3.12 RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl ADD posix/* /usr/local/bin/ diff --git a/docker/Dockerfile.linux.arm8 b/docker/Dockerfile.linux.arm8 index d415727..16672d5 100644 --- a/docker/Dockerfile.linux.arm8 +++ b/docker/Dockerfile.linux.arm8 @@ -1,4 +1,4 @@ -FROM arm64v8/alpine:3.13 +FROM arm64v8/alpine:3.12 RUN apk add --no-cache ca-certificates git git-lfs openssh curl perl ADD posix/* /usr/local/bin/ diff --git a/posix/clone b/posix/clone index 3dc7c27..8720c0a 100755 --- a/posix/clone +++ b/posix/clone @@ -4,11 +4,19 @@ if [[ ! -z "${DRONE_WORKSPACE}" ]]; then cd ${DRONE_WORKSPACE} fi +# if the home directory is not set (which should +# never be the case) we should set to /root + +if [[ -z "${HOME}" ]]; then + echo "HOME directory not set; default to /root" + export HOME=/root +fi + # if the netrc enviornment variables exist, write # the netrc file. if [[ ! -z "${DRONE_NETRC_MACHINE}" ]]; then - cat < /root/.netrc + cat < ${HOME}/.netrc machine ${DRONE_NETRC_MACHINE} login ${DRONE_NETRC_USERNAME} password ${DRONE_NETRC_PASSWORD} @@ -20,12 +28,12 @@ fi # known hosts file. if [[ ! -z "${DRONE_SSH_KEY}" ]]; then - mkdir /root/.ssh - echo -n "$DRONE_SSH_KEY" > /root/.ssh/id_rsa - chmod 600 /root/.ssh/id_rsa + mkdir ${HOME}/.ssh + echo -n "$DRONE_SSH_KEY" > ${HOME}/.ssh/id_rsa + chmod 600 ${HOME}/.ssh/id_rsa - touch /root/.ssh/known_hosts - chmod 600 /root/.ssh/known_hosts + touch ${HOME}/.ssh/known_hosts + chmod 600 ${HOME}/.ssh/known_hosts ssh-keyscan -H ${DRONE_NETRC_MACHINE} > /etc/ssh/ssh_known_hosts 2> /dev/null fi