Skip to content

Instantly share code, notes, and snippets.

View PierreBeucher's full-sized avatar

Pierre Beucher PierreBeucher

View GitHub Profile
echo """
FROM debian:bookworm-20240130-slim
RUN apt update && apt install -y python3 zsh bash
""" > Dockerfile
echo """
val = input()
print('export FOO=' + val)
""" > prog.py
@PierreBeucher
PierreBeucher / gitlab-registry-garbage-collect.sh
Created August 4, 2023 16:06
Manage GitLab Container Registry garbage collection in read-only mode
#!/bin/sh
#
# GitLab Container Registry garbage collector script
# you can configure with cron jobs to run garbage collection nightly
#
# Usage:
#
# - Update your /etc/gitlab/gitlab.rb to add 'REGISTRY-STORAGE-READONLY-ENABLE-MARKER' marker
# as comment on registry config so that script can automatically update it