Skip to content

Instantly share code, notes, and snippets.

View MShekow's full-sized avatar

Marius Shekow MShekow

View GitHub Profile
# This file illustrates a trick for how to delete files from minimal/hardened/distroless images
# that lack a shell, thus "RUN rm <path>" doesn't work.
# Example use case: you want to use a minimal image as base image, but even though that image
# is "minimal", it still contains a few files/folders that you want to delete (e.g. npm in a Node image).
# Note: this approach does NOT make the resulting image smaller - running "rm" only marks the
# deleted files/folders as deleted, making them inaccessible at run-time. The image actually grows
# by approx. 2 MB, due to the busybox tools.
# Note2: This is a somewhat "ugly" trick, but the alternatives (COPY, ADD) don't allow you to "replace" folders
FROM some-minimal-image, e.g., mcr.microsoft.com/azurelinux/distroless/nodejs:24-nonroot
@MShekow
MShekow / Dockerfile
Last active July 1, 2026 12:14
Ubuntu Chiseled JRE image (based on OpenJDK) with Springboot Petclinic sample app
ARG UBUNTU_RELEASE=24.04
ARG CHISEL_VERSION=v1.1.0
FROM eclipse-temurin:21-jdk-noble AS build
ADD https://github.com/spring-projects/spring-petclinic.git /app
WORKDIR /app
RUN ./mvnw package
@MShekow
MShekow / renovate.jsonc
Last active August 12, 2026 13:37
Renovate bot configuration template
// Note: we use JSONC to be able to use comments
// This file is a suggestion for how to customize the default "config:best-practices" preset. The sections below reference
// numbered tips from the cheat sheet in this article: https://www.augmentedmind.de/2023/07/30/renovate-bot-cheat-sheet/
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
// Use better default preset and ignore subpresets you don't need (#2)
"extends": [
"config:best-practices"
],
"ignorePresets": [
#!/bin/bash
# Prepares the macOS VM to be usable from Vagrant
if [[ `id -u` -ne 0 ]] ; then echo "You must run this script as root" ; exit 1 ; fi
set -e
# Enable SSH
systemsetup -setremotelogin on