Skip to content

Instantly share code, notes, and snippets.

If you choose to use a password, inspired from the start.sh at: https://github.com/jbfink/docker-wordpress/blob/master/start.sh
#let's create a user to ssh into
SSH_USERPASS=`pwgen -c -n -1 8`
mkdir /home/user
useradd -G sudo -d /home/user user
chown user /home/user
echo user:$SSH_USERPASS | chpasswd
echo ssh user password: $SSH_USERPASS

Private files in docker container

It is sometimes necessary to have files in a container that shouldn't ever end up in an image. These files are generally some form of private key or password that aren't allowed to be distributed. This document details a few usecases for such files and their requirements.

Use Cases

Private keys for packages

for i in 1 2 3; do
ls $i
done
@scollier
scollier / gist:13436168f4539d6193dd
Last active August 29, 2015 14:04
Atomic Demo
1. Cover Agenda - No slides, all demo
1. Demo 1: Setting up RHEL Atomic
a. Getting the qcow2 image from the customer portal
b. Adding more disk space, fdisk / mkfs.xfs, fstab
c. subscribe the host with subscription manager, list subs
d. finish up demo 1 with a "rpm-ostree upgrade" , reboot into a configured environment
2. Demo 2: Cover a basic httpd server Dockerfile - Non-Systemd
a. Build the image
b. run the image
c. Typical Docker commands: Docker {ps, images, log, etc..}
@scollier
scollier / Atomic_Kuber_HTB_Demo
Last active August 29, 2015 14:05
HTB Atomic / Kubernetes Demo
*************************************************************
Demo 1: Manual Atomic / Kubernetes Configuration
1. Look at the config files for kubernetes
# rpm -qc kubernetes
2. Look at the binaries for kubernetes
# rpm -ql kubernetes | grep bin
@scollier
scollier / gist:0902c4fb3461e2b26931
Created September 22, 2014 16:50
create a bare fedora 20 qcow2 image
#!/bin/bash
SIZE="15"
ROOTPASS="password"
OUTPUTDIR="output"
VMEXISTS=$(virsh list --all | grep -i test)
if [ ! -d "$OUTPUTDIR" ]; then
mkdir ./"$OUTPUTDIR"
fi
@scollier
scollier / gist:8d56f8f82e4e18aebbb9
Last active August 29, 2015 14:06
multi-container kube config
multi-container.json file:
apiVersion: v1beta1
id: multicontainer
desiredState:
manifest:
version: v1beta1
id: multicontainer
containers:
- name: mongodb
@scollier
scollier / atomic_demo_isv
Created October 13, 2014 13:00
Atomic Demo / ISV
test
@scollier
scollier / container_best_practices
Last active August 29, 2015 14:20
Container Best Practices Video
Script for container best practices contribution video.
Set up the environment:
Have the chrome browser showing 3 pre-configured tabs: github, asciidoc reference, docker registry showing container.
Open a terminal to a clean Fedora 21 host.
Start covering the material:
@scollier
scollier / cockpit-ws
Created May 14, 2015 00:00
Cockpit-WS Demo
test