diff --git a/.github/workflows/build-playground.yaml b/.github/workflows/build-playground.yaml new file mode 100644 index 0000000..6f21778 --- /dev/null +++ b/.github/workflows/build-playground.yaml @@ -0,0 +1,42 @@ + +name: Build and push playground image + +on: + push: + paths: + - playground/Dockerfile + +jobs: + docker: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v3 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to Docker Hub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + + - name: Docker meta + id: meta + uses: docker/metadata-action@v4 + with: + images: docker.io/reclaimthestack/playground + flavor: latest=true + tags: type=sha,format=long + + - name: Build and push + uses: docker/build-push-action@v6 + with: + file: playground/Dockerfile + platforms: linux/amd64,linux/arm64 + push: true + tags: ${{ steps.meta.outputs.tags }} diff --git a/playground/Dockerfile b/playground/Dockerfile new file mode 100644 index 0000000..b07980e --- /dev/null +++ b/playground/Dockerfile @@ -0,0 +1,55 @@ +FROM ubuntu:noble-20240904.1 + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update +RUN apt-get install apt-transport-https ca-certificates gnupg git wget curl lsb-release unzip -y + +# Postgres client (https://www.postgresql.org/download/linux/ubuntu/) +RUN apt install -y postgresql-common +RUN /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh -y +RUN install -d /usr/share/postgresql-common/pgdg +RUN curl -o /usr/share/postgresql-common/pgdg/apt.postgresql.org.asc --fail https://www.postgresql.org/media/keys/ACCC4CF8.asc +RUN sh -c 'echo "deb [signed-by=/usr/share/postgresql-common/pgdg/apt.postgresql.org.asc] https://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list' +RUN apt-get update +RUN apt-get install postgresql-client -y + +# Redis client +RUN curl -fsSL https://packages.redis.io/gpg | gpg --dearmor -o /usr/share/keyrings/redis-archive-keyring.gpg +RUN echo "deb [signed-by=/usr/share/keyrings/redis-archive-keyring.gpg] https://packages.redis.io/deb $(lsb_release -cs) main" | tee /etc/apt/sources.list.d/redis.list +RUN apt-get update +RUN apt-get install redis -y + +# ClickHouse client +RUN curl -fsSL 'https://packages.clickhouse.com/rpm/lts/repodata/repomd.xml.key' | gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg +RUN echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" | tee /etc/apt/sources.list.d/clickhouse.list +RUN apt-get update +RUN apt-get install clickhouse-client -y + +# etcd client +RUN wget https://github.com/etcd-io/etcd/releases/download/v3.5.5/etcd-v3.5.5-linux-amd64.tar.gz && \ + tar xvf etcd-v3.5.5-linux-amd64.tar.gz && \ + cd etcd-v3.5.5-linux-amd64 && \ + mv etcd etcdctl etcdutl /usr/local/bin && \ + rm -rf etcd-v3.5.5-linux-amd64* + +# AWS CLI +RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \ + unzip awscliv2.zip && \ + ./aws/install && \ + rm -rf awscliv2.zip aws + +RUN apt-get install -y \ + dnsutils \ + fdisk \ + fio \ + fping \ + iputils-ping \ + iproute2 \ + neovim \ + nodejs \ + default-jre-headless \ + ruby-full \ + traceroute \ + wrk \ + zstd