-
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.
goreleaser: add a release docker image (#101)
- Loading branch information
Showing
4 changed files
with
69 additions
and
2 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# Builds a Docker image with: | ||
# - ctlptl | ||
# - docker | ||
# - kubectl | ||
# - kind | ||
# - socat | ||
# | ||
# Good base image for anyone that wants to use ctlptl in a CI environment | ||
# to set up a one-time-use cluster. | ||
# | ||
# Built with goreleaser. | ||
|
||
FROM debian:buster | ||
|
||
RUN apt update && 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 | ||
|
||
COPY ctlptl /usr/local/bin/ctlptl |