Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View BretFisher's full-sized avatar
🗃️
All Day Containers!

Bret Fisher BretFisher

🗃️
All Day Containers!
View GitHub Profile
# Set the host's tags
tags:
- environment: dev
- app: ['core', 'apache-php']
- tier: application
- visibility: private
#tags: mytag0, mytag1

Keybase proof

I hereby claim:

  • I am BretFisher on github.
  • I am bretfisher (https://keybase.io/bretfisher) on keybase.
  • I have a public key whose fingerprint is 3356 2888 3C9F 74C4 8772 B7EA E698 7430 7C9B 2417

To claim this, I am signing this object:

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: SKS 1.1.5
Comment: Hostname: pgp.mit.edu
mQINBFU4Ax4BEADmfzwSV9aXtxkiL6GCmvg3KYr4VmQc1LSqU7RekmbTdxcnPXrsUq7ZrFUD
h9zC+cKcjiQFcTyeoEEX/+9Y09tqOLKcqX4EtXozRGlBeAabCwFa9pwAmEb8g62cm7fSVLO+
DFFD6IX9H4rGPLhKNNXXuE3zJWKE4n1aZaXYRHRHUL55+Bgm3hT1Kcos/KnFje2YqDUy4xTk
kL4SJQwNoFILdK/ebVK1eaRspf+JMUh5qa5n4ExtpZfiH8vb67X5YaE9skz8AruG6COICH0D
fBSOqVnN3RjIWpWvGBAOhznCOrwPedGY+PAQzhOjfnXvtRqIEgZreBretg4ULC4R5VUE+1qA
J5IftuymKhlLiCBLgidk0Bh3JTbvH7FSHcLAd6Ljkyq1L3Sg4jQ9ciJpVzyS27eR7c2vft6X
@BretFisher
BretFisher / execstart.conf
Created January 27, 2016 22:38
Docker 1.9 UCP 0.6 RHEL Daemon startup
[Unit]
Description=Docker Application Container Engine
Documentation=http://docs.docker.com
After=network.target docker.socket
Requires=docker.socket
[Service]
ExecStart=
ExecStart=/usr/bin/docker daemon -H fd:// -H unix://var/run/docker.sock --exec-opt native.cgroupdriver=cgroupfs --storage-driver=devicemapper --ip x.x.x.x
MountFlags=private
@BretFisher
BretFisher / update.sh
Created February 8, 2016 18:42
Mac Update/Cleanup Script
#!/bin/sh
# store the current dir
CUR_DIR=$(pwd)
# Update App Store apps
sudo softwareupdate -i -a
# Update Homebrew (Cask) & packages
brew update
@BretFisher
BretFisher / log-delete.ps1
Created February 11, 2016 19:16
Exchange 2013 Log Cleanup PowerShell Script
Set-Executionpolicy RemoteSigned
$days=10 #You can change the number of days here
$IISLogPath="C:\inetpub\logs\"
$ExchangeLoggingPath="C:\Program Files\Microsoft\Exchange Server\V15\Logging\"
Function CleanLogfiles($TargetFolder)
{
if (Test-Path $TargetFolder) {
$Now = Get-Date
@BretFisher
BretFisher / .travis.yml
Created February 15, 2016 21:26
Travis-CI Docker Image Build and Push to AWS ECR
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
services:
- docker # required, but travis uses older version of docker :(
install:
- echo "install nothing!" # put your normal pre-testing installs here
@BretFisher
BretFisher / docker-cli-tips-and-tricks.md
Last active December 6, 2023 19:49
Docker CLI Tips and Tricks
@BretFisher
BretFisher / docker-xenial-copy-paste.sh
Last active December 1, 2023 01:39
Install Docker PPA on Ubuntu 16.04
# NOT FOR SHELL SCRIPT, but rather just for quick copy paste
# this is a copy-paste version with defaults of the full shell script docker-xenial.sh which is below this one in gist.
apt-get -y install apt-transport-https ca-certificates curl && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - && \
add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" && \
service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \
apt-get update -q && \
apt-get install -y -q docker-ce && \
printf '{ "userns-remap" : "default" , "storage-driver" : "overlay2" }' > /etc/docker/daemon.json && \
@BretFisher
BretFisher / docker-swarm-ports.md
Last active April 4, 2024 22:19
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example