-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for clusters and registries on remote docker (#99)
Fixes #92 This PR assumes that "non-empty DOCKER_HOST" means "ctlptl is talking to a remote docker and needs additional connections between localhost and the remote machine." I'm not entirely sure this is a safe assumption, but let's try it and see how it goes.
- Loading branch information
Showing
15 changed files
with
238 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
FROM golang:1.14-buster | ||
|
||
RUN apt update | ||
RUN apt install -y curl ca-certificates liblz4-tool rsync socat | ||
|
||
# Install docker | ||
# Adapted from https://github.com/circleci/circleci-images/blob/staging/shared/images/Dockerfile-basic.template | ||
# Check https://download.docker.com/linux/static/stable/x86_64/ for latest versions | ||
ENV DOCKER_VERSION=19.03.5 | ||
RUN set -exu \ | ||
&& DOCKER_URL="https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_VERSION}.tgz" \ | ||
&& echo Docker URL: $DOCKER_URL \ | ||
&& curl --silent --show-error --location --fail --retry 3 --output /tmp/docker.tgz "${DOCKER_URL}" \ | ||
&& ls -lha /tmp/docker.tgz \ | ||
&& tar -xz -C /tmp -f /tmp/docker.tgz \ | ||
&& mv /tmp/docker/* /usr/bin \ | ||
&& rm -rf /tmp/docker /tmp/docker.tgz \ | ||
&& which docker \ | ||
&& (docker version || true) | ||
|
||
# Install kubectl client | ||
RUN apt install -y apt-transport-https gnupg \ | ||
&& curl -fsS https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \ | ||
&& touch /etc/apt/sources.list.d/kubernetes.list \ | ||
&& echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | tee -a /etc/apt/sources.list.d/kubernetes.list \ | ||
&& apt update && apt install -y kubectl | ||
|
||
# install Kind | ||
ENV KIND_VERSION=v0.10.0 | ||
RUN set -exu \ | ||
&& curl -fLo ./kind-linux-amd64 "https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION}/kind-linux-amd64" \ | ||
&& chmod +x ./kind-linux-amd64 \ | ||
&& mv ./kind-linux-amd64 /usr/local/bin/kind | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
GOPATH = $(shell go env GOPATH) | ||
|
||
.PHONY: generate test vendor | ||
.PHONY: generate test vendor publish-ci-image | ||
|
||
install: | ||
go install ./cmd/ctlptl | ||
|
@@ -22,4 +22,8 @@ golangci-lint: $(GOLANGCILINT) | |
$(GOPATH)/bin/golangci-lint run --verbose | ||
|
||
$(GOLANGCILINT): | ||
(cd /; GO111MODULE=on GOPROXY="direct" GOSUMDB=off go get github.com/golangci/golangci-lint/cmd/[email protected]) | ||
(cd /; GO111MODULE=on GOPROXY="direct" GOSUMDB=off go get github.com/golangci/golangci-lint/cmd/[email protected]) | ||
|
||
publish-ci-image: | ||
docker build -t gcr.io/windmill-public-containers/ctlptl-e2e-ci -f .circleci/Dockerfile . | ||
docker push gcr.io/windmill-public-containers/ctlptl-e2e-ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.