Skip to content

Instantly share code, notes, and snippets.

View prologic's full-sized avatar
👋
Principal SRE, Founder of Yarn.social and Salty.im

James Mills prologic

👋
Principal SRE, Founder of Yarn.social and Salty.im
View GitHub Profile
@prologic
prologic / test.sh
Created April 9, 2020 03:55
Minimal working Container Sandboxing on uLinux with POSIX Shell scripts
# ./congine /bin/sh
# hostname
container
# id
uid=0(root) gid=0(root) groups=0(root),0(root),65534,65534,65534,65534,65534,65534
# ps aux
PID USER TIME COMMAND
1 root 0:00 /bin/sh
4 root 0:00 ps aux
# Container Terminated
Loading /etc/os-release ...
You should have EPEL enabled to install all the prerequisites.
Check: http://www.tecmint.com/how-to-enable-epel-repository-for-rhel-centos-6-5/
Running in non-interactive mode
> CentOS Version: 8 ...
> Checking for epel ...
Running in non-interactive mode, assuming yes (y)
> Would have promptedfor epel not found, shall I install it? ...
yum -y install epel-release
CentOS-8 - AppStream [=== ] --- B/s | 0 B --:-- ETA CentOS-8 - AppStream100% [====================] 1.4 kB/s | 681 B 00:00 ETA CentOS-8 - AppStream 17% [===- ] 242 kB/s | 1.2 MB 00:22 ETA CentOS-8 - AppStream 35% [======= ] 461 kB/s | 2.3 MB 00:09 ETA CentOS-8 - AppStream 45% [========= ] 565 kB/s | 3.0 MB 00:06 ETA CentOS-8 - AppStream 56% [=========== ] 687 kB/s | 3.7 MB 00:04 ETA CentOS-8 - AppStream 70% [============== ] 825 kB/s | 4.6 MB 00:02 ETA CentOS-8 - AppStream 85% [================= ] 979 kB/s | 5.6 MB
@prologic
prologic / build.log
Created January 17, 2020 04:05
$ docker build --no-cache --build-arg DISTRO=opensuse --build-arg DISTRO_VERSION=15.1 -t netdata/netdata:opensuse_15.1 .
Sending build context to Docker daemon 53.8MB
Step 1/30 : ARG ARCH=amd64
Step 2/30 : ARG DISTRO=debian
Step 3/30 : ARG DISTRO_VERSION=buster
Step 4/30 : ARG VERSION=0.1
Step 5/30 : FROM netdata/builder:${DISTRO}_${DISTRO_VERSION} AS build
---> 9522f44e840a
Step 6/30 : ARG ARCH
---> Running in eac382bbfa22
@prologic
prologic / build.log
Created January 17, 2020 04:04
$ docker build --no-cache -t netdata/builder:opensuse_15.1 -f package-builders/Dockerfile.opensuse15.1 .
Sending build context to Docker daemon 451.6kB
Step 1/7 : FROM opensuse:15.1
---> fef5ad254f63
Step 2/7 : ARG VERSION=0.1
---> Running in 20856432fd0d
Removing intermediate container 20856432fd0d
---> 4bf1adda8a2d
Step 3/7 : ENV VERSION=$VERSION
---> Running in 2b4872e0be02
@prologic
prologic / test.log
Created January 16, 2020 22:27
$ dki -t --rm netdata/netdata:fedora_30 | tee test.log
Waiting for netdata on localhost:19999 ... OK
"v1.19.0-317-ga637ae4a"
@prologic
prologic / build.log
Created January 16, 2020 22:27
$ time docker build --build-arg DISTRO=fedora --build-arg DISTRO_VERSION=30 -t netdata/netdata:fedora_30 . | tee build.log
Sending build context to Docker daemon 53.77MB
Step 1/30 : ARG ARCH=amd64
Step 2/30 : ARG DISTRO=debian
Step 3/30 : ARG DISTRO_VERSION=buster
Step 4/30 : ARG VERSION=0
Step 5/30 : FROM netdata/builder:${DISTRO}_${DISTRO_VERSION} AS build
---> 4a3fb33bb433
Step 6/30 : ARG ARCH
---> Using cache
@prologic
prologic / build.log
Created January 16, 2020 02:27
docker build -f package-builders/Dockerfile.fedora30 -t netdata/builder:fedora_30 .
prologic@Jamess-iMac
Thu Jan 16 12:23:53
~/NetData/helper-images
(fedora-builder-images) 0
$ docker build -f package-builders/Dockerfile.fedora30 -t netdata/builder:fedora_30 .
Sending build context to Docker daemon 326.7kB
Step 1/8 : FROM fedora:30
30: Pulling from library/fedora
b0fe058ffda2: Pull complete
Digest: sha256:a31809d5e9d991a291605e932077aaf5f2beff64dee85b34d911228196af406e
@prologic
prologic / build.log
Created January 16, 2020 02:17
docker build -f package-builders/Dockerfile.ubuntu1804 -t netdata/builder:ubuntu_1804
prologic@Jamess-iMac
Thu Jan 16 12:10:38
~/NetData/helper-images
(ubuntu-builder-images) 0
$ docker build -f package-builders/Dockerfile.ubuntu1804 -t netdata/builder:ubuntu_1804 .
Sending build context to Docker daemon 304.1kB
Step 1/12 : FROM ubuntu:18.04
18.04: Pulling from library/ubuntu
2746a4a261c9: Pull complete
4c1d20cdee96: Pull complete
@prologic
prologic / build.log
Created January 15, 2020 03:13
$ docker build -t netdata/builder:debian_buster -f package-builders/Dockerfile.debian_buster .
prologic@Jamess-iMac
Wed Jan 15 10:21:17
~/NetData/helper-images
(debian-builder-images) 0
$ docker build -t netdata/builder:debian_buster -f package-builders/Dockerfile.debian_buster .
Sending build context to Docker daemon 269.8kB
Step 1/12 : FROM debian:buster
buster: Pulling from library/debian
8f0fdd3eaac0: Pull complete
Digest: sha256:f19be6b8095d6ea46f5345e2651eec4e5ee9e84fc83f3bc3b73587197853dc9e
@prologic
prologic / post.go
Created December 18, 2019 12:56
A quick 'n dirty MIcroPub Go (Golang) client for Micro.blog (https://micro.blog)
package main
import (
"flag"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"