Skip to content

Commit

Permalink
Release/more build testing (#16)
Browse files Browse the repository at this point in the history
testing new releases changes
shriking the container image
  • Loading branch information
donkeyx authored Jun 20, 2024
1 parent a0973c2 commit a4c5673
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 16 deletions.
17 changes: 15 additions & 2 deletions .github/workflows/docker-build-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
push:
tags:
- "v*"
branches:
- "release/*"

jobs:
cache:
Expand All @@ -14,8 +16,7 @@ jobs:
- name: Cache Docker layers
uses: actions/cache@v2
with:
path: |
/tmp/.buildx-cache
path: /tmp/.buildx-cache
key: ${{ runner.os }}-docker-${{ hashFiles('**/Dockerfile') }}

docker:
Expand Down Expand Up @@ -57,9 +58,21 @@ jobs:
ghcr.io/donkeyx/cluster-utils
docker.io/donkeyx/cluster-utils
tags: |
type=sha
type=ref,event=branch
type=semver,pattern={{version}}
type=semver,pattern={{major}}
type=semver,pattern={{major}}.{{minor}}
branches: |
release/*
- name: Debug Metadata Outputs
run: |
echo "Tags: ${{ steps.meta.outputs.tags }}"
echo "Labels: ${{ steps.meta.outputs.labels }}"
echo "Images: ${{ steps.meta.outputs.images }}"
echo "Meta Outputs: ${{ toJson(steps.meta.outputs) }}"
- name: Build and push
uses: docker/build-push-action@v5
Expand Down
26 changes: 12 additions & 14 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,33 +1,31 @@
# Description: This is a utility container with all the tools needed for testing clusters and networks
FROM debian:bookworm-slim

# Metadata
ARG VERSION=latest
LABEL maintainer="David Binney <donkeysoft@gmail.com>"
LABEL version=$VERSION
LABEL description="This container is a utility for testing within cluster or networks and not needing to install tooling"
LABEL description="This is a utility for testing within cluster or networks and not needing to install tooling"

ENV TZ="Australia/Adelaide"

WORKDIR /app

COPY ./*.sh /app/

# Update and install basic tools
RUN apt-get update && apt-get install -y \
dnsutils netcat-openbsd curl wget tar gnupg vim tmux zsh screenfetch && \
postgresql-client redis-tools && \
git golang nodejs npm && \
# Update and install all required tools in one RUN command to minimize layers
RUN apt-get update && apt-get install -y --no-install-recommends \
dnsutils netcat-openbsd curl wget tar gnupg vim tmux zsh \
postgresql-client redis-tools git golang nodejs npm && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

# # Install MongoDB tools
# RUN curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg -o /usr/share/keyrings/mongodb-server-7.0.gpg --dearmor && \
# echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list && \
# apt-get update && apt-get install -y mongodb-org-tools && \
# Uncomment and modify the MongoDB tools installation if needed
# RUN curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg && \
# echo "deb [signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg] http://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" | tee /etc/apt/sources.list.d/mongodb-org-7.0.list && \
# apt-get update && apt-get install -y --no-install-recommends mongodb-org-tools && \
# apt-get clean && \
# rm -rf /var/lib/apt/lists/*
# rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

RUN ./kickstart.sh

ENTRYPOINT ["zsh", "/app/sleeper.sh"]
ENTRYPOINT ["zsh", "/app/sleeper.sh"]

0 comments on commit a4c5673

Please sign in to comment.