Skip to content

Commit

Permalink
Include the docker image used by k playground in the repo
Browse files Browse the repository at this point in the history
  • Loading branch information
dbackeus committed Oct 8, 2024
1 parent 71900b0 commit a63a543
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/build-playground.yaml
Original file line number Diff line number Diff line change
@@ -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
push: true
tags: ${{ steps.meta.outputs.tags }}
3 changes: 3 additions & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ on:
branches:
- master
- test-release
paths:
- k
- k_pg_proxy

name: Create Release

Expand Down
49 changes: 49 additions & 0 deletions playground/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
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-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

0 comments on commit a63a543

Please sign in to comment.