Skip to content

Instantly share code, notes, and snippets.

All Day Containers!

Bret Fisher BretFisher

All Day Containers!
View GitHub Profile
BretFisher / gruvbox-light.js
Last active May 17, 2020 — forked from anhari/gist:23ae031e93e2f465258439cb6802acad
gruvbox *light* blink shell theme
View gruvbox-light.js
black = '#fbf1c7';
red = '#cc241d'; // red
green = '#98971a'; // green
yellow = '#d79921'; // yellow
blue = '#458588'; // blue
magenta = '#b16286'; // pink
cyan = '#689d6a'; // cyan
white = '#7c6f64'; // light gray
lightBlack = '#928374'; // medium gray
lightRed = '#9d0006'; // red
BretFisher /
Created Oct 31, 2019
Scary Course Sale for Halloween
BretFisher / .zshrc
Created Jul 4, 2018
my custom oh-my-zsh setup
View .zshrc
# this assumes your using oh-my-zsh for maximum zsh-ness
# info and defaults are here:
export LC_ALL="en_US.UTF-8"
export ZSH=/Users/bret/.oh-my-zsh
# custom prompt theme
ZSH_THEME="present" # mine is present, default is robbyrussell, also agnoster, fishy, ys, wild-cherry
BretFisher /
Created Apr 22, 2018
Docker Alias common stuff, mostly from oh-my-zsh
dcb='docker-compose build'
dcdn='docker-compose down'
dce='docker-compose exec'
dcl='docker-compose logs'
dclf='docker-compose logs -f'
dcps='docker-compose ps'
dcr='docker-compose run'
dcrestart='docker-compose restart'
dcrm='docker-compose rm'
BretFisher /
Last active May 30, 2020
Getting a Shell in the Docker for Windows Moby VM

2018 Update: Easiest option is Justin's repo and image

Just run this from your CLI and it'll drop you in a container with full permissions on the Moby VM. Only works for Moby Linux VM (doesn't work for Windows Containers). Note this also works on Docker for Mac.

docker run -it --rm --privileged --pid=host justincormack/nsenter1

more info:

BretFisher /
Last active Apr 11, 2019
docker swarm upgrade

Replace your Swarm Manager and Workers with updated versions of docker

  • it's best to replace nodes, don't do apt/yum upgrades.
  • both would work, but VM replacment forces me to think of it as immutable and prevents making pets
  • if you don't want to update join scripts for manager IP's, then do something like Elastic IP's so manager IP's won't change.

Lets assume you have 3 managers and 3 workers on 17.06 and you want to update to 17.12

  • managers: m1, m2, m3
BretFisher / # et - 2017-12-13_05-58-36.txt
Created Dec 13, 2017
et (mistertea/et/et) on macOS 10.13.2 - Homebrew build logs
View # et - 2017-12-13_05-58-36.txt
Homebrew build logs for mistertea/et/et on macOS 10.13.2
Build date: 2017-12-13 05:58:36
BretFisher / docker-compose.yml
Created Nov 10, 2017
Docker Compose local development with wildcard DNS for multi-domain development
View docker-compose.yml
version: '3'
# is a wildcard domain that resolves to localhost
# in case you need to pass URL's around from browser to
# containers this could help you get around localhost problem
# use to access web containter from host
# use to access api container from host
BretFisher / Dockerfile
Last active Jul 28, 2020
WIP sample Laravel php_fpm plus nginx plus supervisor Docker setup with npm, composer, bower, and more
View Dockerfile
FROM yourdockername/base-php-nginx:latest AS build
# the primary reason we have two build stages is so SSH key of private repo's will never
# be in final image
# It won't be copied to final image
# add this build arg to compose file
RUN if [ -z "$BUILDKEY" ]; then echo "BUILDKEY SSH NOT SET - ERROR"; exit 1; else : ; fi
BretFisher /
Last active Aug 5, 2020
On macOS: Install pygmentize and alias pcat for shell code syntax highlighting
# first install pygmentize to the mac OS X or macOS system with the built-in python
sudo easy_install Pygments
# then add alias to your ~/.bash_profile or ~/.bashrc or ~/.zshrc etc.
alias pcat='pygmentize -f terminal256 -O style=native -g'
You can’t perform that action at this time.