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
#!/usr/bin/env bash | |
# install docker | |
# https://docs.docker.com/engine/installation/linux/ubuntulinux/ | |
# install docker-compose | |
# https://docs.docker.com/compose/install/ | |
# install letsencrypt | |
# https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04 |
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
mkdir www | |
echo "Hello World" > www/index.html | |
# create a file called Dockerfile | |
' | |
FROM nginx | |
COPY www /usr/share/nginx/html | |
' |
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
screen ~/Library/Containers/com.docker.docker/Data/com.docker.driver.amd64-linux/tty |
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
# .ssh/config | |
Host * | |
ServerAliveInterval 60 |
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
docker inspect -f '{{ .Mounts }}' container-id |
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
hub: | |
image: selenium/hub | |
ports: | |
- "4444:4444" | |
firefox: | |
image: selenium/node-firefox | |
links: | |
- hub | |
log_driver: none | |
chrome: |
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
import os | |
from docker import Client | |
from docker.utils import kwargs_from_env | |
kwargs = kwargs_from_env() | |
#kwargs['tls'].assert_hostname = False | |
client = Client(**kwargs) | |
containers = client.containers() |
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
def application(env, start_response): | |
start_response('200 OK', [('Content-Type', 'text/html')]) | |
return ["Hello!"] | |
# start with: | |
# gunicorn -b 0.0.0.0:8080 wsgi& | |
# gunicorn -b 0.0.0.0:8080 --workers=5 wsgi | |
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
docker inspect -f "{{.Name}} {{.Config.Cmd}}" $(docker ps -a -q) |
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
chrome://flags/#allow-insecure-localhost |