Skip to content

Instantly share code, notes, and snippets.

View afbjorklund's full-sized avatar

Anders Björklund afbjorklund

  • Göteborg, Sweden
View GitHub Profile
@afbjorklund
afbjorklund / Dockerfile
Last active September 30, 2025 16:37
apple container with docker
FROM ubuntu
RUN apt-get update && apt-get install -y --no-install-recommends ca-certificates curl && rm -rf /var/lib/apt/lists/*
RUN curl -fsSL https://get.docker.com | sh
RUN apt-get update && apt-get install -y --no-install-recommends procps && rm -rf /var/lib/apt/lists/*
RUN ( echo "net.ipv6.conf.all.disable_ipv6=1"; echo "net.ipv6.conf.default.disable_ipv6=1" ) | tee /etc/sysctl.d/container.conf
RUN apt-get update && apt-get install -y --no-install-recommends iptables && rm -rf /var/lib/apt/lists/*
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy && update-alternatives --set ip6tables /usr/sbin/ip6tables-legacy
@afbjorklund
afbjorklund / default.hjson
Created July 30, 2025 08:18
default.yaml converted to default.hjson
{
additionalDisks: null
arch: null
audio:
{
device: null
}
caCerts:
{
certs: null
@afbjorklund
afbjorklund / Dockerfile
Created July 8, 2025 16:23
apple container with kubernetes
FROM debian:testing AS build
# log_proxy
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential
RUN apt-get install -y pkg-config libglib2.0-dev
RUN apt-get install -y wget openssl ca-certificates
RUN wget --content-disposition https://github.com/metwork-framework/log_proxy/archive/refs/tags/v0.7.4.tar.gz \
&& tar xzf log_proxy-0.7.4.tar.gz && cd log_proxy-0.7.4 && make install STATIC=yes
@afbjorklund
afbjorklund / Dockerfile
Created June 30, 2025 16:21
apple container with containerd
FROM debian:testing AS build
# log_proxy
RUN apt-get update
RUN apt-get install -y --no-install-recommends build-essential
RUN apt-get install -y pkg-config libglib2.0-dev
RUN apt-get install -y wget openssl ca-certificates
RUN wget --content-disposition https://github.com/metwork-framework/log_proxy/archive/refs/tags/v0.7.4.tar.gz \
&& tar xzf log_proxy-0.7.4.tar.gz && cd log_proxy-0.7.4 && make install STATIC=yes
@afbjorklund
afbjorklund / oras-gateway.py
Created February 6, 2025 17:30
simple curl proxy for oras artifacts
#!/usr/bin/env python3
# simple proxy for oras artifacts
import http.server
import oras.client
import argparse
from urllib.parse import urlparse
import base64
from collections import namedtuple
@afbjorklund
afbjorklund / lima.yaml
Last active June 3, 2024 13:42
lima.yaml for kubernetes 10 year celebration (ubuntu 15.04)
# This template requires Lima v0.7.0 or later.
arch: "x86_64"
images:
- location: "http://cloud-images-archive.ubuntu.com/releases/vivid/release-20160203/ubuntu-15.04-server-cloudimg-amd64-disk1.img"
arch: "x86_64"
digest: "sha256:a348500d04de3352af3944e9dae99a08d60091221e1370941b93bd7a27971568"
firmware:
legacyBIOS: true
mounts: []
.vagrant
#!/bin/sh
# Wrapper for using kubectl as "ssh", for rsync and git
# - setting either $RSYNC_RSH or $GIT_SSH env variables
namespace=''
pod=$1
shift
# POD[@NAMESPACE]:DEST
if [ "X$pod" = "X-l" ]; then
pod=$1
#!/usr/bin/env python
# convert go test report JSON into chrome tracing JSON
import sys
import json
import datetime
import dateutil.parser
def datetime_parser(json_dict):
@afbjorklund
afbjorklund / pstree.txt
Last active August 17, 2020 06:23
hello buildroot kubernetes world
# pstree
systemd-+-dbus-daemon
|-dockerd-+-containerd-+-7*[containerd-shim-+-pause]
| | | `-9*[{containerd-shim}]]
| | |-containerd-shim-+-etcd---10*[{etcd}]
| | | `-9*[{containerd-shim}]
| | |-containerd-shim-+-kube-apiserver---9*[{kube-apiserver}]
| | | `-9*[{containerd-shim}]
| | |-containerd-shim-+-kube-scheduler---8*[{kube-scheduler}]
| | | `-9*[{containerd-shim}]