Skip to content

Instantly share code, notes, and snippets.

@mhumeSF
mhumeSF / Makefile
Created February 25, 2024 03:19
nix-raspi-img-builder
# Default target
all: clone build
# Target to clone the nixpkgs repository
clone:
@if [ ! -d "$(PWD)/nixpkgs" ]; then \
git clone --depth=1 -b release-23.05 https://github.com/NixOS/nixpkgs; \
else \
echo "nixpkgs repository already exists in $(PWD)/nixpkgs"; \
fi

Docker on Lima (lima-vm/lima) Setup Guide

In recent months, Lima has become de facto standard software as a free and open source alternative to Docker Desktop for Mac. Several projects (such as Colima, Rancher Desktop, or Finch) for similar purpose also uses Lima as their backend. These projects will make it easier to set up Lima. But some people may not want to introduce extra components other than Lima. This guide will show you how to set up Lima to be alternative to Docker Desktop for Mac, while using Lima only.

🪣 Note. It is a good practice to uninstall Docker Desktop for Mac before proceeding with the following steps.

1. Install Lima and Docker CLI

@mhumeSF
mhumeSF / haproxy-redirect - Dockerfile
Last active November 30, 2020 08:16
haproxy-redirect
FROM haproxy:alpine
COPY haproxy.cfg /usr/local/etc/haproxy/haproxy.cfg
# Install and Configure aws-cli and jq
RUN apk add -U --no-cache python3 jq && pip3 install --no-cache-dir awscli
COPY aws/ /root/.aws/
@mhumeSF
mhumeSF / docker-compose.yml
Created May 19, 2019 21:25
tini-init-example
version: '3'
services:
web:
image: nginx
@mhumeSF
mhumeSF / drone-traefik-post-4
Last active May 18, 2018 19:20
drone-traefik-post-4
version: '2'
services:
web:
image: "xxxxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/web/web-project-x"
labels:
- "traefik.enable=true"
- "traefik.frontend.rule=Host:$ENV.$PROJECT.gumgum.com;PathPrefixStrip:/$DRONE_BRANCH;"
ports:
- "80"
@mhumeSF
mhumeSF / drone-traefik-post-3
Last active July 27, 2022 16:19
drone-traefik-post-3
pipeline:
build_node_image:
image: plugins/docker
repo: "xxxxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com/web/${DRONE_REPO_NAME}"
registry: xxxxxxxxxxxx.dkr.ecr.us-east-1.amazonaws.com
tags:
- latest
- ${DRONE_COMMIT_SHA}
deploy_stage:
image: ecs-cli
@mhumeSF
mhumeSF / drone-traefik-post-1
Last active May 18, 2018 19:20
drone-traefik-post-1
feature/WEB-1234-design-system-improvements
feature/WEB-5678-refactor-video-script-export
hotfix/WEB-7777-one-element-above-line
@mhumeSF
mhumeSF / drone-traefik-post-2
Last active May 18, 2018 19:20
drone-traefik-post-2
dev.web-project-x.gumgum.com/feature/WEB-1234-design-system-improvements
dev.web-project-x.gumgum.com/feature/WEB-5678-refactor-video-script-export
dev.web-project-x.gumgum.com/hotfix/WEB-7777-one-element-above-line
http://www.blang.io/posts/2015-04_how-to-build-the-smallest-docker-containers/
# You might pull the scratch image from docker hub, i experienced that’s not possible with some versions of docker, but you can simply build it yourself:
tar cv --files-from /dev/null | docker import - empty
# This command creates an empty image called empty.
FROM empty