Skip to content

Instantly share code, notes, and snippets.

View athlan's full-sized avatar

Piotr Pelczar athlan

View GitHub Profile
@athlan
athlan / ConcurrentMementoSupplier.java
Created July 11, 2019 14:59
ConcurrentMementoSupplier Java
package pl.athlan.common.concurrent;
import java.util.function.Supplier;
import javax.annotation.concurrent.ThreadSafe;
/**
* Thread-safe implementation of {@link MementoSupplier}.
*
* @param <T>
@athlan
athlan / Dockerfile
Last active July 6, 2024 09:31
Docker cron env variables
FROM XXXX
#Install cron
RUN apt-get update; \
apt-get install -y cron; \
apt-get clean; \
touch /var/log/cron.log
COPY crontab.txt /etc/cron.d/crontab
COPY run-cron.sh /usr/local/app/entrypoint/run-cron.sh
@athlan
athlan / README.md
Created January 16, 2024 19:57
Diagnose docker container size

Sometimes there's a problem where containers taking up all space. The following checklist helps with diagnosing what is the root cause of that.

  1. Basic commands to check docker status and consumed size
docker system df
docker system df -v
docker container ls -s