Skip to content

Commit

Permalink
Add redis cli, postgresl cli, move to python base image and bump vers…
Browse files Browse the repository at this point in the history
…ion to 1.2.0
  • Loading branch information
gzur committed Feb 12, 2025
1 parent 268b52f commit 623f4e2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 25 deletions.
33 changes: 12 additions & 21 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,34 +1,25 @@
FROM ubuntu:xenial
FROM python:3.11-slim

# TODO: Fold the update with the install once this has stabilized
ARG DEBIAN_FRONTEND=noninteractive
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8

# Install core requirements
# Install core requirements
RUN apt-get update --quiet && \
apt-get install --quiet --yes \
software-properties-common \
openssh-client \
git \
fish

SHELL ["fish", "--command"]

RUN chsh -s /usr/bin/fish

ENV SHELL /usr/bin/fish
ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8

# Install fun things to have inside a k8s container
RUN apt-get update --quiet -y
RUN apt-get install --quiet -y \
curl \
dnsutils \
jq \
netcat \
tcpdump

RUN alias k=kubectl
RUN alias ll="ls -latr"
netcat-traditional \
tcpdump \
redis-tools \
postgresql-client \
vim && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

COPY VERSION /VERSION
CMD [ "sleep", "infinity" ] # Overridable in yaml

CMD ["sleep", "infinity"]
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
VERSION := $(shell cat VERSION)
DOCKER_REPO := "gzur/keightool"

# k8s stuff - this is here to make it easier to override the image
IMAGE ?= $(DOCKER_REPO)
docker.build:
docker build -t $(DOCKER_REPO):$(VERSION) .

Expand All @@ -15,11 +17,12 @@ docker.push:
docker.shell:
docker run -it $(DOCKER_REPO):$(VERSION) fish

# k8s stuff
k8s.up:
$(eval CURRENT_NAMESPACE := $(shell kubectl config view --minify -o jsonpath='{..namespace}'))

@echo "## Installing keightool into the \"$(CURRENT_NAMESPACE)\" namespace."
@kubectl apply -f yaml/
@echo "## keightool is running the $(IMAGE) image. Overide by supplying `IMAGE=your-image` to the make command"
cat yaml/* | sed 's~gzur/keightool~$(IMAGE)~g' | kubectl apply -n $(CURRENT_NAMESPACE) -f -

k8s.down:
$(eval CURRENT_NAMESPACE := $(shell kubectl config view --minify -o jsonpath='{..namespace}'))
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.1.1
1.2.0
2 changes: 1 addition & 1 deletion yaml/keightool.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ spec:
cpu: "250m"
limits:
memory: "128Mi"
cpu: "500m"
cpu: "500m"

0 comments on commit 623f4e2

Please sign in to comment.