- download these two files to the same directory
- docker-compose up
- http://localhost should show you "it works" which is apache being reverse-proxied through nginx
- docker sets up DNS for
web
based on compose service name so the nginx front-end can find http://web - proxy is set to listen on public port 80 on host so it'll receive incoming traffic, then push to httpd
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Homebrew build logs for mistertea/et/et on macOS 10.13.2 | |
Build date: 2017-12-13 05:58:36 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
# vcap.me 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 | |
services: | |
# use www.vcap.me to access web containter from host | |
# use api.vcap.me to access api container from host | |
proxy: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM yourdockername/base-php-nginx:latest AS build | |
# BUILD STAGE | |
# the primary reason we have two build stages is so SSH key of private repo's will never | |
# be in final image | |
# COPY IN BUILD SSH KEY | |
# It won't be copied to final image | |
# add this build arg to compose file | |
ARG BUILDKEY | |
RUN if [ -z "$BUILDKEY" ]; then echo "BUILDKEY SSH NOT SET - ERROR"; exit 1; else : ; fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# so docker cloud now has swarms fleet mgmt | |
# and you can use something like this to connect from cli to your swarm via docker remote api: | |
docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST dockercloud/client bretfisher/swarm1 | |
# but maybe we can put that in a bash alias to make it easier | |
alias cswarm="docker run --rm -ti -v /var/run/docker.sock:/var/run/docker.sock -e DOCKER_HOST dockercloud/client" | |
#then | |
cswarm bretfisher/dude-swarm1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
warning: /proc/config.gz does not exist, searching other paths for kernel config ... | |
info: reading kernel config from /boot/config-4.4.0-64-generic ... | |
Generally Necessary: | |
- cgroup hierarchy: properly mounted [/sys/fs/cgroup] | |
- apparmor: enabled, but apparmor_parser missing | |
(use "apt-get install apparmor" to fix this) | |
- CONFIG_NAMESPACES: enabled | |
- CONFIG_NET_NS: enabled | |
- CONFIG_PID_NS: enabled |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# tmux config for ultimate winning | |
# make tmux display things in 256 colors | |
#set -g default-terminal "screen-256color" | |
# use this if italic enabled in term profile | |
set -g default-terminal "tmux-256color" | |
# set just true color without custom term | |
#set -ga terminal-overrides ",xterm-256color:Tc" | |
# fixes bug: https://github.com/tmux/tmux/issues/435 | |
#set -ga terminal-overrides ',xterm*:sitm=\E[3m' |
Just run this from your Mac terminal and it'll drop you in a container with full permissions on the Docker VM. This also works for Docker for Windows for getting in Moby Linux VM (doesn't work for Windows Containers).
docker run -it --rm --privileged --pid=host justincormack/nsenter1
more info: https://github.com/justincormack/nsenter1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# problem: when presenting, I want to obscure | |
# my prompt to act like it's at root of file system | |
# and be very basic with no git info, etc. | |
# solution: this theme lets you set a ENV to the path | |
# of your presentation, which will help remove unneeded prompt | |
# features while in that path | |
# oh-my-zsh theme for presenting demos | |
# based off the default rubbyrussell theme |