Skip to content

Instantly share code, notes, and snippets.

Avatar

Tom von Schwerdtner tvon

View GitHub Profile
@tvon
tvon / Dockerfile
Created Jun 30, 2020
nsswitch / netdns
View Dockerfile
FROM golang:1 as builder
COPY . /src
WORKDIR /src
RUN go build -o /src/test
RUN /src/test
@tvon
tvon / add-label
Last active Feb 2, 2020
Add a label to a Docker image tarball.
View add-label
#!/bin/bash
#
# Add a label to an image tarball (manifest v1).
#
# $ docker save alpine -o alpine.tar
# $ add-label alpine.tar org.mine.key foobar
# $ docker load -i alpine.tar
# $ docker inspect alpine | jq '.[].Config.Labels'
# {
# "org.mine.key": "foobar"
@tvon
tvon / rewrite-docker-tar
Last active Jan 31, 2020
rewrite containerd docker tarballs
View rewrite-docker-tar
#!/bin/bash
#
# rewrite-docker-tar ./image.tar ./output.tar
#
# Exporting 'docker' tarballs with buildctl is creating manifests with no file
# extensions (no .json or .tar.gz on the config or layers). This works with
# dockerd because it never looks at the extensions just tries various things with
# safe fallbacks. Other tooling relies on extensions and checks for
# .json, .tar, and .tar.gz.
#
@tvon
tvon / config.yaml
Created Nov 3, 2019
terminus config
View config.yaml
hotkeys:
profile: {}
shell: {}
toggle-window:
- - Ctrl-`
ssh: {}
terminal:
bell: visual
colorScheme:
name: Tomorrow Night
@tvon
tvon / doSomething.groovy
Created Oct 29, 2018
Jenkins pipeline vars/doSomething.groovy
View doSomething.groovy
#!/usr/bin/env groovy
// Specify default values but allow overriding.
//
// dosomething {
// arg1 = true
// arg2 = false
// arg3 = "https://www.hotbot.com"
// }
@tvon
tvon / build.gradle
Created Sep 13, 2017
Debugging gradle.build / jenkins issue
View build.gradle
plugins {
id 'org.jenkins-ci.jpi' version '0.22.0'
id 'groovy'
id 'java'
id 'idea'
}
build.dependsOn jpi
View main.yaml
- name: "unifi | configure service db.mongo.local"
lineinfile:
dest: "/usr/lib/unifi/data/system.properties"
regexp: '^db\.mongo\.local='
line: "db.mongo.local={{ unifi_db_mongo_local }}"
insertbefore: BOF
@tvon
tvon / Dockerfile
Last active Feb 9, 2017
minikube-iso-builder
View Dockerfile
FROM golang:1.6
RUN dpkg --add-architecture i386 \
&& apt-get -q update \
&& apt-get -q -y upgrade \
&& apt-get -y install \
automake \
bc \
build-essential \
bzr \
View joystick.Microsoft.Xbox.One.Controller.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- This file contains the mappings for a Microsoft Xbox One Controller to actions within XBMC -->
<!-- The drivers for Linux and Windows do not always match. Mappings for Win32 will be presented -->
<!-- first, with Linux alts second. -->
<!-- The <global> section is a fall through - they will only be used if the button is not -->
<!-- used in the current window's section. Note that there is only handling -->
<!-- for a single action per button at this stage. -->
<!-- The format of a mapping is: -->
<!-- <device name="name"> -->
View terraform.tf
provider "docker" {
host = "tcp://192.168.99.100:2376/"
}
## Containers
resource "docker_container" "flexo-gogs" {
image = "${docker_image.gogs.latest}"
name = "flexo-gogs"
}
You can’t perform that action at this time.