Skip to content

Instantly share code, notes, and snippets.

View aweiteka's full-sized avatar

Aaron Weitekamp aweiteka

  • Red Hat
  • Boston, MA
View GitHub Profile
general:
ref_url_base: https://docs.docker.com/reference/builder/
valid_instructions:
- FROM
- MAINTAINER
- RUN
- CMD
- EXPOSE
- ENV
- ADD
#!/usr/bin/env bash
IMAGES=( "pulp/crane-allinone" \
"aweiteka/pulp-worker" \
"aweiteka/pulp-qpid" \
"aweiteka/pulp-mongodb" \
"aweiteka/pulp-apache" \
"aweiteka/pulp-data" \
"aweiteka/pulp-centosbase" )
#!/bin/bash
declare -A IMAGES
# ["build_directory"]=image/name
IMAGES+=( ["base"]=aweiteka/pulp-centosbase \
["config-data"]=aweiteka/pulp-data \
["crane-allinone"]=aweiteka/pulp-crane-allinone \
["worker"]=aweiteka/pulp-worker \
["qpid"]=aweiteka/pulp-qpid \
@aweiteka
aweiteka / docker_image_federation.md
Last active August 29, 2015 14:08
NG: Image Federation

What is image layer federation?

Image federation is where dependent image layers are served from different servers. For example, an ISV builds on a Red Hat base image. The ISV layers are served from cdn.isv.com and the Red Hat layers are served from cdn.redhat.com.

The content-addressable v2 image format and registry makes this an ideal time to consider this model.

Why is it important? Who cares?

Many companies require to host their own bits. It's their control point. It's an important legal and provenance issue for them.

How does it work?

A simple example:

@aweiteka
aweiteka / pulp-restart.sh
Created November 4, 2014 19:38
Restart pulp services
#!/usr/bin/env bash
apachectl restart
systemctl restart pulp_workers
systemctl restart pulp_celerybeat
systemctl restart pulp_resource_manager
@aweiteka
aweiteka / docker_run_file.md
Last active August 29, 2015 14:08
Proposal: docker run from file

Use case

I am a developer...

I have my app running as a container on my laptop. It works. I need to give this to QE to test but I need a reliable way to tell them how to run it. The docker run command is really complex. I want to snapshot a running (or stopped) container(s) and check it into version control.

I am a tester / I am an ops engineer / I am an end-user

I need a way to reliably run docker images. I want to run them exactly how the developer and QE did. I need a data structure, a file, that specifies this so I can stop the "copy+paste from README" error-prone, never-updated madness. I'll need to be able to specify or override some parameters like --name <name> or -e MYVAR=<production_var>.

Opportunity

@aweiteka
aweiteka / cockpit_inspect_failing.json
Last active August 29, 2015 14:09
running cockpit
[{
"Args": [],
"Config": {
"AttachStderr": true,
"AttachStdin": false,
"AttachStdout": true,
"Cmd": [
"/container/cockpit-run"
],
"CpuShares": 0,
@aweiteka
aweiteka / novaboot.sh
Last active August 29, 2015 14:10
atomic on openstack using cloud-init
#!/bin/bash
nova boot --flavor m1.medium --poll --image RHEL-Atomic-Host-Cloud-7.0.0-Beta --user-data ~/Documents/user-data.txt atomic-test
nova list|grep atomic-test
@aweiteka
aweiteka / central_ci_dynamic_hosts.py
Last active August 29, 2015 14:11
Ansible dynamic inventory script for central CI that returns json of provisioned hosts
#!/usr/bin/python
'''
Ansible dynamic inventory script for central CI
returns json of provisioned hosts
'''
import json
import os
@aweiteka
aweiteka / test_docker.sh
Created December 18, 2014 17:07
Run unit tests on Docker
#!/bin/sh -e
systemctl start docker.service
yum install -y git
git clone https://github.com/docker/docker.git
cd docker
make test