Skip to content

Instantly share code, notes, and snippets.

View megglos's full-sized avatar
:octocat:

Sebastian Bathke megglos

:octocat:
View GitHub Profile

⚠️ I have written a newer, simpler guide. This gist will not be updated anymore. See https://gist.github.com/fuzmish/df9eabf711c3f452ca19cce0621fc84e.

Running multi-arch images with Docker on Lima

Docker on Lima is one of the alternative solutions to Docker Desktop for Mac. Many people have already described the steps to set up for that. In addition to such a standard setup, this guide describes how to set up a Docker environment which can run multi-arch images. For example, you will be able to run linux/amd64 images on your M1 Mac.

Step 1. Install Lima

@coderofsalvation
coderofsalvation / cronjoblock
Last active December 5, 2023 12:38
cronjob wrapper with locking support
# portable cronjob wrapper to ensure :
#
# * only one process at the time (prevents process-overlap, handy for unique cron workers)
# * reverse cron's email behaviour (only emails on error)
# * ultraportable: only relies on flock, not on debians 'start-stop-daemon' or centos 'daemon'
# * nicelevel to tame cpu usage
#
# usage: cronjoblock <application> [args]
# example: cronjoblock /home/foo/myscript &
# cronjoblock /home/foo/myscript & <--- 'myscript' will only run when the previous run is finished