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
# Description: Boxstarter Script | |
# Author: szukalski | |
# Last Updated: 2018-09-18 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
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
# Description: Boxstarter Script | |
# Author: szukalski | |
# Last Updated: 2017-10-16 | |
# | |
# Install boxstarter: | |
# . { iwr -useb http://boxstarter.org/bootstrapper.ps1 } | iex; get-boxstarter -Force | |
# | |
# You might need to set: Set-ExecutionPolicy RemoteSigned | |
# | |
# Run this boxstarter by calling the following from an **elevated** command-prompt: |
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 run -d -v <local_vol>:<container_vol> -p <local_port>:<container_port> --restart always IMAGE | |
docker exec -it RUNNING_IMAGE COMMAND |
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 build -t image_name . | |
docker tag image_id szukalski/image_name:latest | |
docker login | |
docker push szukalski/image_name |
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
Session: | |
C-b d Detach session | |
tmux ls List sessions | |
tmux new -s <session> New session | |
tmux attach -t <session> Attach session | |
Panes: | |
C-b % Split pane horizontally | |
C-b " Split pane vertically | |
C-b <arrow key> Navigate panes |
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
#!/bin/bash | |
# Run as root | |
if [ "$#" -ne 1 ]; | |
then | |
echo "Usage: <script> <username>" | |
exit 1 | |
fi | |
USER=$1 | |
EMAIL=your.email.address@gmail.com |
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
eval "$(ssh-agent -s)" | |
ssh-add /root/.ssh/id_rsa | |
git clone git@github.com:szukalski/XYZ | |
git add XYZ/blah.file | |
git commit -m "some description" | |
git push origin master |
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
#!/bin/bash | |
# Run this as root | |
PERSISTENT_DATA_DIR=/srv/docker | |
IMAGE=grafana/grafana | |
CONTAINER=grafana | |
CONF_CONTAINER=/etc/grafana | |
CONF_HOST=$PERSISTENT_DATA_DIR/$CONTAINER$CONF_CONTAINER | |
DATA_CONTAINER=/var/lib/grafana | |
DATA_HOST=$PERSISTENT_DATA_DIR/$CONTAINER$DATA_CONTAINER | |
ADMIN_PASSWORD=secret |
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
#!/bin/bash | |
# Run this as root | |
PERSISTENT_DATA_DIR=/srv/docker | |
GITHUB_USER=szukalski | |
GITHUB_REPO=docker-influxdb | |
IMAGE=influxdb | |
CONTAINER=influxdb | |
# Pull the GITHUB repo | |
cd $PERSISTENT_DATA_DIR |
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
#!/bin/bash | |
# Run this as root | |
# Configure docker repo | |
apt-get update | |
apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common |
NewerOlder