diff --git a/docker-img/awscli/Dockerfile b/docker-img/awscli/Dockerfile new file mode 100644 index 0000000..f058aee --- /dev/null +++ b/docker-img/awscli/Dockerfile @@ -0,0 +1,19 @@ +FROM alpine:latest + +RUN apk --no-cache add \ + ca-certificates \ + groff \ + less \ + python3 \ + py3-pip \ + && pip3 install awscli \ + && mkdir -p /root/.aws \ + && { \ + echo '[default]'; \ + echo 'output = json'; \ + echo 'region = us-east-1'; \ + echo 'aws_access_key_id = $AMAZON_ACCESS_KEY_ID'; \ + echo 'aws_secret_access_key = $AMAZON_SECRET_ACCESS_KEY'; \ + } > /root/.aws/config + + ENTRYPOINT [ "aws" ] diff --git a/docker-img/awscli/install.sh b/docker-img/awscli/install.sh new file mode 100644 index 0000000..5fd5d1e --- /dev/null +++ b/docker-img/awscli/install.sh @@ -0,0 +1,24 @@ + +cat > ../bin/yq <" + +# Install Chrome +RUN apt-get update && apt-get install -y \ + apt-transport-https \ + ca-certificates \ + curl \ + gnupg \ + hicolor-icon-theme \ + libcanberra-gtk* \ + libgl1-mesa-dri \ + libgl1-mesa-glx \ + libpangox-1.0-0 \ + libpulse0 \ + libv4l-0 \ + fonts-symbola \ + --no-install-recommends \ + && curl -sSL https://dl.google.com/linux/linux_signing_key.pub | apt-key add - \ + && echo "deb [arch=amd64] https://dl.google.com/linux/chrome/deb/ stable main" > /etc/apt/sources.list.d/google.list \ + && apt-get update && apt-get install -y \ + google-chrome-stable \ + --no-install-recommends \ + && apt-get purge --auto-remove -y curl \ + && rm -rf /var/lib/apt/lists/* + +# Add chrome user +RUN groupadd -r chrome && useradd -r -g chrome -G audio,video chrome \ + && mkdir -p /home/chrome/Downloads && chown -R chrome:chrome /home/chrome + +COPY local.conf /etc/fonts/local.conf + +# Run Chrome as non privileged user +USER chrome + +# Autorun chrome +ENTRYPOINT [ "google-chrome" ] +CMD [ "--user-data-dir=/data" ] diff --git a/docker-img/chrome/local.conf b/docker-img/chrome/local.conf new file mode 100644 index 0000000..f6a5f5c --- /dev/null +++ b/docker-img/chrome/local.conf @@ -0,0 +1,34 @@ + + + + + +rgb + + + + +true + + + + +hintslight + + + + +true + + + + +lcddefault + + + + +false + + + diff --git a/docker-img/github-dind/Dockerfile b/docker-img/github-dind/Dockerfile new file mode 100644 index 0000000..242b797 --- /dev/null +++ b/docker-img/github-dind/Dockerfile @@ -0,0 +1,30 @@ +FROM registry.ic-ops.net/base/docker:23-dind + +ARG GOOS=linux +ARG GOARCH=amd64 +ARG VAULT_VERS=1.12.1 +ARG GO_VERS=latest +ARG GO_TARGET_DIR=/usr/local/share +ARG JQ_VERS=latest +ARG YQ_VERS=latest + +ENV ENV="/root/.profile" + +RUN curl -L "https://github.com/mikefarah/yq/releases/${YQ_VERS}/download/yq_linux_amd64" -o "/usr/local/bin/yq" \ + && chmod +x /usr/local/bin/yq +RUN curl -L "https://github.com/jqlang/jq/releases/${JQ_VERS}/download/jq-linux-amd64" -o "/usr/local/bin/jq" \ + && chmod +x /usr/local/bin/jq +RUN curl -L "https://releases.hashicorp.com/vault/${VAULT_VERS}/vault_${VAULT_VERS}_linux_amd64.zip" -o /tmp/vault_${VAULT_VERS}_linux_amd64.zip \ + && unzip /tmp/vault_${VAULT_VERS}_linux_amd64.zip \ + && mv vault /usr/local/bin/vault \ + && rm /tmp/vault_${VAULT_VERS}_linux_amd64.zip + +COPY install-go /tmp/install-go +RUN chmod +x /tmp/install-go \ + && sh /tmp/install-go \ + && rm /tmp/install-go + +ENV PATH="/usr/local/bin/:$GO_TARGET_DIR/go/bin:$PATH" +ENV GOPATH="$GO_TARGET_DIR/go" +ENV GOBIN="$GO_TARGET_DIR/go/bin" + diff --git a/docker-img/github-dind/install-go b/docker-img/github-dind/install-go new file mode 100644 index 0000000..358f9f8 --- /dev/null +++ b/docker-img/github-dind/install-go @@ -0,0 +1,37 @@ +#!/usr/bin/env sh + +TARGETDIR=${GO_TARGET_DIR:="/usr/local/"} + +lookup_file() { + curl -sSL "https://go.dev/dl/?mode=json" | + jq -r '.[0].files[] + | select(.os == "'"$GOOS"'") + | select(.arch == "'"$GOARCH"'") + | .filename' +} + +fetch() { + local filename + if [ $GO_VERS == "latest" ]; then + filename="$(lookup_file)" + else + filename="$GO_VERS.$GOOS-$GOARCH.tar.gz" + fi + [[ -z "$filename" ]] && echo "unable to fetch filename" 1>&2 && return 1 + local path="/tmp/$filename" + [[ -n "$DOWNLOADS" ]] && [[ -d "$DOWNLOADS" ]] && path="$DOWNLOADS/$filename" + curl -L "https://go.dev/dl/$filename" -o "$path" + echo "$path" +} + +install_latest_go() { + local dir="$1" path + [[ -z "$dir" ]] && dir="$TARGETDIR" + [[ -z "$dir" ]] && dir="$HOME/.local" + mkdir -p "$dir" 2>/dev/null + path="$(fetch)" + [[ -z "$path" ]] && echo "unable to fetch go tarball" 1>&2 && return 1 + rm -rf "$dir/go" && tar -C "$dir" -xzf "$path" +} + +install_latest_go "$@" diff --git a/docker-img/htop/Dockerfile b/docker-img/htop/Dockerfile new file mode 100644 index 0000000..838252a --- /dev/null +++ b/docker-img/htop/Dockerfile @@ -0,0 +1,5 @@ +FROM debian:latest + +RUN apt update && apt install -y htop + +CMD ["htop"] diff --git a/docker-img/yqjq/Dockerfile b/docker-img/yqjq/Dockerfile new file mode 100644 index 0000000..b9fcc0b --- /dev/null +++ b/docker-img/yqjq/Dockerfile @@ -0,0 +1,9 @@ +FROM alpine:latest + +RUN apk update && \ + apk add \ + yq \ + jq + +#CMD ["yq"] +ENTRYPOINT ["yq"] diff --git a/docker-img/yqjq/install.sh b/docker-img/yqjq/install.sh new file mode 100644 index 0000000..5fd5d1e --- /dev/null +++ b/docker-img/yqjq/install.sh @@ -0,0 +1,24 @@ + +cat > ../bin/yq <