Skip to content

Instantly share code, notes, and snippets.

@philippkueng
Last active August 29, 2015 14:03
Show Gist options
  • Save philippkueng/b6f8632cea9a7103663b to your computer and use it in GitHub Desktop.
Save philippkueng/b6f8632cea9a7103663b to your computer and use it in GitHub Desktop.
Creating a Docker Application
#cloud-config
coreos:
etcd:
# generate a new token for each unique cluster from
# https://discovery.etcd.io/new
discovery: https://discovery.etcd.io/f3b743dac73a950101567222fe38620e
# multi-region and multi-cloud deployments need to use $public_ipv4
addr: $private_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
command: start
- name: fleet.service
command: start

Install gcutil and register the credit card with GCE

Create a single machine, named core1

gcutil addinstance --image=projects/coreos-cloud/global/images/coreos-beta-353-0-0-v20140625 --persistent_boot_disk --zone=europe-west1-b --machine_type=f1-micro --metadata_from_file=user-data:cloud-config.yaml core1

Log into core1

gcutil ssh --ssh_user=core core1

Log into a docker container via tty

sudo docker run -t -i ubuntu:14.04 /bin/bash

Docker Cheat Sheet

Get a complete history for a docker image

docker history --no-trunc ckan/solr

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment