Skip to content

Commit

Permalink
chore: allow docker-host to be configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
shreddedbacon committed Jul 7, 2024
1 parent 02d1bba commit 9aa5286
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 100 deletions.
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ COPY legacy/scripts /kubectl-build-deploy/scripts
COPY legacy/helmcharts /kubectl-build-deploy/helmcharts

ENV DBAAS_OPERATOR_HTTP=dbaas.lagoon.svc:5000
ENV DOCKER_HOST=docker-host.lagoon.svc

RUN architecture=$(case $(uname -m) in x86_64 | amd64) echo "amd64" ;; aarch64 | arm64 | armv8) echo "arm64" ;; *) echo "amd64" ;; esac) \
&& curl -sSL https://github.com/uselagoon/lagoon-linter/releases/download/v0.8.0/lagoon-linter_0.8.0_linux_${architecture}.tar.gz \
Expand Down
61 changes: 0 additions & 61 deletions legacy/Dockerfile.kubectl

This file was deleted.

35 changes: 0 additions & 35 deletions legacy/Dockerfile.kubectl-build-deploy-dind

This file was deleted.

8 changes: 4 additions & 4 deletions legacy/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ set -e
# try connect to docker-host 10 times before giving up
DOCKER_HOST_COUNTER=1
DOCKER_HOST_TIMEOUT=10
until docker -H docker-host.lagoon.svc info &> /dev/null
until docker -H ${DOCKER_HOST} info &> /dev/null
do
if [ $DOCKER_HOST_COUNTER -lt $DOCKER_HOST_TIMEOUT ]; then
let DOCKER_HOST_COUNTER=DOCKER_HOST_COUNTER+1
echo "docker-host.lagoon.svc not available yet, waiting for 5 secs"
echo "${DOCKER_HOST} not available yet, waiting for 5 secs"
sleep 5
else
echo "could not connect to docker-host.lagoon.svc"
echo "could not connect to ${DOCKER_HOST}"
exit 1
fi
done
export DOCKER_HOST=docker-host.lagoon.svc


mkdir -p ~/.ssh

Expand Down

0 comments on commit 9aa5286

Please sign in to comment.