Skip to content

Instantly share code, notes, and snippets.

View LeonardSchuler's full-sized avatar

Leonard Schuler LeonardSchuler

View GitHub Profile
@LeonardSchuler
LeonardSchuler / container.sh
Last active September 20, 2025 10:41
Docker Container Without Dockerd on Amazon Linux 2023
export CONTAINER_DIR="/tmp/mycontainer"
mkdir -p $CONTAINER_DIR/{bin,lib,lib64,usr,etc,dev,proc}
cp /usr/bin/bash $CONTAINER_DIR/bin
cp /usr/bin/ps $CONTAINER_DIR/bin
cp /usr/bin/mount $CONTAINER_DIR/bin
cp /usr/bin/ls $CONTAINER_DIR/bin
cp /lib64/ld-linux-x86-64.so.2 $CONTAINER_DIR/lib64/
@LeonardSchuler
LeonardSchuler / main.tf
Last active September 1, 2024 14:50
EC2 with elastic IPv4 running docker command (Terraform)
terraform {
required_version = ">= 1.0"
required_providers {
aws = {
source = "hashicorp/aws"
version = "5.65.0"
}
}
}
@LeonardSchuler
LeonardSchuler / ecr.md
Last active August 21, 2024 15:59
Get ECR login token with curl

Assumes that the AWS environment variables are set:

AWS_REGION
AWS_ACCESS_KEY_ID
AWS_SECRET_ACCESS_KEY
AWS_SESSION_TOKEN

Get ECR Login Token