Skip to content

Instantly share code, notes, and snippets.

All Day Containers!

Bret Fisher BretFisher

All Day Containers!
View GitHub Profile
BretFisher /
Last active Dec 3, 2016
Code For Hampton Roads Intro
BretFisher /
Last active Nov 30, 2016
Hercules Original Proposal

Hack to Help 2015 Winners Original Proposal


TOL DWS Explore Hampton Roads


HRQLS "An easy-to-use tool for visualizing quality of life by regions in Hampton Roads.

Overall Vision & Functionality

EHR weights and merges QoL factors such as crime, cost, health, schools, transportation, sanitation, recreation, and others to produce a map representing QoL in regions within Hampton Roads. The user adjusts sliders for each factor to find the optimal location in which to live based on their input.

BretFisher / Dockerfile-selenium-nodejs
Created Nov 17, 2016
Dockerfile selenium with nodejs
View Dockerfile-selenium-nodejs
FROM selenium/standalone-chrome
# lets install node 6.x then cleanup
# install build-essential and leave in case npm needs it
# we have to sudo because selenium defaults to seluser
RUN sudo bash \
&& sudo apt-get install -y nodejs build-essential \
&& sudo rm -rf /var/lib/apt/lists/*
BretFisher / docker-ps.txt
Created Oct 28, 2016
slowly adding containers
View docker-ps.txt
0ed57993dc33 alpine:latest "top" About a minute ago Up About a minute c1m.26887.6hhpgf6e0ceh44u9m77o6ua5o
34bbec457d3f alpine:latest "top" About a minute ago Up About a minute c1m.24871.6sz0rw4sinx057q460rbryi9t
509cc29a7aac alpine:latest "top" 2 minutes ago Up 2 minutes c1m.23778.6fodlsp1gfb11z4zc3ht7nvfl
e2e852a5c42f alpine:latest "top" 3 minutes ago Up 3 minutes c1m.20352.epp244g73mt4s76wph31ixizl
0ef9694c621a alpine:latest "top" 5 minutes ago Up 5 minutes
BretFisher / syslog.txt
Created Oct 28, 2016
errors in syslog
View syslog.txt
Oct 28 14:37:18 ip-172-31-63-55 dockerd[26165]: time="2016-10-28T14:37:18.308189347Z" level=info msg="2016/10/28 14:37:18 [INFO] memberlist: Marking ip-172-31-59-92-7b438b1188a3 as failed, suspect timeout reached\n"
Oct 28 14:37:18 ip-172-31-63-55 dockerd[26165]: time="2016-10-28T14:37:18.753674582Z" level=info msg="2016/10/28 14:37:18 [INFO] memberlist: Marking ip-172-31-21-186-3dcc744b686c as failed, suspect timeout reached\n"
Oct 28 14:37:18 ip-172-31-63-55 dockerd[26165]: time="2016-10-28T14:37:18.842625022Z" level=info msg="2016/10/28 14:37:18 [INFO] memberlist: Suspect ip-172-31-23-36-12bf3bd381ff has failed, no acks received\n"
BretFisher / copy-paste.txt
Last active Feb 28, 2018
install docker engine for swarm3k on Ubuntu 16.04. 2 options for installing
View copy-paste.txt
#option 1: copy and paste this into ssh to install docker engine
# NOTE: update --label=owner=YOURNAME below if you want to easily identify yours
apt-key adv --keyserver hkp:// --recv-keys 58118E89F3A912897C070ADBF76221572C52609D && \
mkdir -p /etc/apt/sources.list.d && \
echo deb ubuntu-xenial main > /etc/apt/sources.list.d/docker.list && \
printf 'net.ipv4.neigh.default.gc_thresh1 = 30000\nnet.ipv4.neigh.default.gc_thresh2 = 32000\nnet.ipv4.neigh.default.gc_thresh3 = 32768' >> /etc/sysctl.conf && \
sysctl -p && \
service lxcfs stop && apt-get remove -y -q lxc-common lxcfs lxd lxd-client && \
apt-get update -q && apt-get install -y -q linux-image-extra-$(uname -r) linux-image-extra-virtual && \
BretFisher /
Last active Jan 16, 2022
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

BretFisher /
Last active Aug 26, 2021
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 which is below this one in gist.
apt-get -y install apt-transport-https ca-certificates curl && \
curl -fsSL | sudo apt-key add - && \
add-apt-repository "deb [arch=amd64] $(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 /
Last active Dec 17, 2021
Docker CLI Tips and Tricks
BretFisher / .travis.yml
Created Feb 15, 2016
Travis-CI Docker Image Build and Push to AWS ECR
View .travis.yml
sudo: required #is required to use docker service in travis
language: php #can be any language, just php for example
- docker # required, but travis uses older version of docker :(
- echo "install nothing!" # put your normal pre-testing installs here