Docker Multi-Tool Development Environment for ACT (local GitHub action)
157
This Docker image creates a comprehensive development environment based on Ubuntu 22.04, packed with essential tools for modern software development, testing, and deployment. It's designed to support Go development, testing with Ginkgo, containerization workflows, and Kubernetes operations.
1.23.8 - Primary programming language with full toolchain20 - JavaScript runtime for modern web development17 - OpenJDK for Java-based applications3.x - With pip and development headersv2.24.0 - BDD testing framework for Go3.x - Kubernetes package manager# Go Configuration
GOPATH=/go
GOBIN=/go/bin
PATH=/usr/local/go/bin:/go/bin:$PATH
# Java Configuration
JAVA_HOME=/usr/lib/jvm/java-17-openjdk
PATH=$JAVA_HOME/bin:$PATH
# Proxy Support (build-time)
HTTP_PROXY, HTTPS_PROXY, NO_PROXY
This Docker image is perfect for:
FROM ubuntu:22.04
# -----------------------------
# Versions & base environment
# -----------------------------
ENV DEBIAN_FRONTEND=noninteractive
ENV GO_VERSION=1.23.8
ENV NODE_VERSION=20
ENV JAVA_VERSION=17
ENV GINKGO_VERSION=v2.24.0
# Runtime env
ENV GOPATH=/go
ENV GOBIN=$GOPATH/bin
ENV PATH=/usr/local/go/bin:$GOBIN:$PATH
# Optional proxy passthrough (build-time)
ARG HTTP_PROXY
ARG HTTPS_PROXY
ARG NO_PROXY
ENV http_proxy=$HTTP_PROXY
ENV https_proxy=$HTTPS_PROXY
ENV no_proxy=$NO_PROXY
# ---------------------------------------------
# Base deps (lean) + make sure CA certs are set + sudo
# ---------------------------------------------
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates curl wget gnupg git sudo \
python3 python3-pip python3-dev \
build-essential make gcc jq unzip \
&& update-ca-certificates \
&& rm -rf /var/lib/apt/lists/*
# -----------------
# Install Go (arch-aware, no checksum)
# -----------------
RUN set -eux; \
arch="$(dpkg --print-architecture)"; \
case "$arch" in amd64|arm64) ;; *) echo "unsupported architecture: $arch" >&2; exit 1 ;; esac; \
wget -4 -O /tmp/go.tgz "https://go.dev/dl/go${GO_VERSION}.linux-${arch}.tar.gz"; \
tar -C /usr/local -xzf /tmp/go.tgz; rm -f /tmp/go.tgz; \
mkdir -p "$GOPATH/src" "$GOPATH/bin"
# ----------------------------
# Install Ginkgo & Gomega lean
# (use temp GOPATH, place binaries in /usr/local/bin, then clean)
# ----------------------------
RUN set -eux; \
export GOPATH=/tmp/gopath GOBIN=/usr/local/bin; \
go install github.com/onsi/ginkgo/v2/ginkgo@${GINKGO_VERSION}; \
go version; \
go clean -modcache; \
rm -rf /tmp/gopath
# -----------------
# Docker Engine (DinD tools)
# -----------------
# NOTE: If you don't need the daemon, you can install only docker-ce-cli + docker-compose-plugin to save ~300–400MB
RUN set -eux; \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg; \
. /etc/os-release; \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu ${VERSION_CODENAME} stable" > /etc/apt/sources.list.d/docker.list; \
apt-get update && apt-get install -y --no-install-recommends \
docker-ce docker-ce-cli containerd.io docker-compose-plugin \
&& rm -rf /var/lib/apt/lists/*
# --------
# Node.js 20
# --------
RUN curl -fsSL https://deb.nodesource.com/setup_${NODE_VERSION}.x | bash - && \
apt-get install -y --no-install-recommends nodejs && \
rm -rf /var/lib/apt/lists/*
# ----
# Java
# ----
RUN apt-get update && apt-get install -y --no-install-recommends \
openjdk-${JAVA_VERSION}-jdk \
&& rm -rf /var/lib/apt/lists/* \
&& ln -sf "/usr/lib/jvm/java-${JAVA_VERSION}-openjdk-$(dpkg --print-architecture)" "/usr/lib/jvm/java-${JAVA_VERSION}-openjdk"
ENV JAVA_HOME=/usr/lib/jvm/java-${JAVA_VERSION}-openjdk
ENV PATH=$JAVA_HOME/bin:$PATH
# -----------------------------
# Kubernetes tools (kubectl/helm)
# -----------------------------
RUN set -eux; \
arch="$(dpkg --print-architecture)"; \
curl -fsSLo /usr/local/bin/kubectl "https://dl.k8s.io/release/$(curl -fsSL https://dl.k8s.io/release/stable.txt)/bin/linux/${arch}/kubectl"; \
chmod +x /usr/local/bin/kubectl; \
curl -fsSL -o /tmp/get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3; \
chmod 700 /tmp/get_helm.sh; /tmp/get_helm.sh; rm /tmp/get_helm.sh
# ----
# k3d
# ----
RUN curl -fsSL https://raw.githubusercontent.com/k3d-io/k3d/main/install.sh | bash
# ---------------------
# Final cleanup (caches)
# ---------------------
RUN set -eux; \
# npm/pip/go caches
npm cache clean --force || true; rm -rf /root/.npm || true; \
pip cache purge || true; \
go clean -cache -testcache || true; \
# docs/manpages/locales (optional but helps)
rm -rf /usr/share/doc/* /usr/share/man/* /usr/share/info/* /var/cache/* /root/.cache/*
# ---------------------
# Verify installations
# ---------------------
RUN go version && \
ginkgo version && \
node --version && \
npm --version && \
java -version && \
python3 --version && \
git --version && \
docker --version && \
kubectl version --client && \
helm version && \
k3d version && \
sudo --version
CMD ["/bin/bash"]
Content type
Image
Digest
sha256:b24e12341…
Size
638.2 MB
Last updated
about 1 year ago
docker pull vishal210893/act-env:3