I hereby claim:
- I am daldei on github.
- I am daldei (https://keybase.io/daldei) on keybase.
- I have a public key ASD7e_4q1N0JwG5DSbdZUhLTg99I8tJ3ng60y-Uxd2eRJAo
To claim this, I am signing this object:
{ "variables": { | |
"amznrepo" : "file:///var/repo", | |
"version" : "1.0", | |
"repository" : "nexstra/createrepo", | |
"baseImage" : "amazonlinux:latest", | |
"yumrepo" : "", | |
"amznrepo" : "/space/amazonlinux/repo", | |
"yumrepod" : "{{pwd}}/../yum.repos.d", | |
"awsEcr" : "{{env `AWS_ECR`}}", | |
"doEcrLogin" : "true" |
2017/09/14 22:19:50 [INFO] Packer version: 1.1.0 | |
2017/09/14 22:19:50 Packer Target OS/Arch: linux amd64 | |
2017/09/14 22:19:50 Built with Go Version: go1.9 | |
2017/09/14 22:19:50 Detected home directory from env var: /home/dlee | |
2017/09/14 22:19:50 Using internal plugin for alicloud-ecs | |
2017/09/14 22:19:50 Using internal plugin for amazon-ebs | |
2017/09/14 22:19:50 Using internal plugin for azure-arm | |
2017/09/14 22:19:50 Using internal plugin for lxc | |
2017/09/14 22:19:50 Using internal plugin for vmware-vmx | |
2017/09/14 22:19:50 Using internal plugin for file |
#!/bin/env python | |
import yaml | |
import sys | |
import json | |
import argparse | |
from subprocess import Popen, PIPE | |
import argparse | |
import os |
I hereby claim:
To claim this, I am signing this object:
# Convert an existing docker container into a "docker run" command line. | |
# | |
# This is useful when trying to debug containers that have been created | |
# by orchestration tools. | |
# | |
# Install jq: stedolan.github.io/jq/ | |
# Improved version that handles ports, volumes, binds | |
function format_run() { | |
cid=$1 |
# backup files from a docker volume into /tmp/backup.tar.gz | |
# from http://stackoverflow.com/questions/21597463/how-to-port-data-only-volumes-from-one-host-to-another | |
function docker-volume-backup-compressed() { | |
docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie tar -czvf /backup/backup.tar.gz "${@:2}" | |
} | |
# restore files from /tmp/backup.tar.gz into a docker volume | |
function docker-volume-restore-compressed() { | |
docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie tar -xzvf /backup/backup.tar.gz "${@:2}" | |
echo "Double checking files..." | |
docker run --rm -v /tmp:/backup --volumes-from "$1" debian:jessie ls -lh "${@:2}" |
// from: http://www.rgagnon.com/javadetails/java-have-a-simple-http-server.html | |
import java.io.IOException; | |
import java.io.OutputStream; | |
import java.net.InetSocketAddress; | |
import com.sun.net.httpserver.HttpExchange; | |
import com.sun.net.httpserver.HttpHandler; | |
import com.sun.net.httpserver.HttpServer; | |
/* |
// from: http://stackoverflow.com/questions/3732109/simple-http-server-in-java-using-only-java-se-api | |
import java.io.*; | |
import javax.xml.ws.*; | |
import javax.xml.ws.http.*; | |
import javax.xml.transform.*; | |
import javax.xml.transform.stream.*; | |
@WebServiceProvider | |
@ServiceMode(value = Service.Mode.PAYLOAD) | |
public class Server implements Provider<Source> { |
#!/bin/bash | |
aws ec2 describe-images --owners amazon --filters "Name=state,Values=available" \ | |
"Name=architecture,Values=x86_64" \ | |
"Name=root-device-type,Values=ebs" \ | |
"Name=virtualization-type,Values=hvm" \ | |
"Name=block-device-mapping.volume-type,Values=gp2" \ | |
"Name=hypervisor,Values=xen" \ | |
--query 'Images[?Description!=null]|[?contains(Description,`Amazon Linux`) == `true`]|\ | |
[?contains(Description,` NAT `)==`false`]|[?contains(Description,` ECS `)==`false`]|\ | |
sort_by(@, &CreationDate)[-1]' |
Docker defauilts to taking over netowrks 172.17.0.0. | |
If this conflicts with other tools such as a VPN which you cannot control, | |
you can change the default bridge. This is easier if you have never started docker. | |
You wouldnt be reading this if that were the case. | |
So how to get out of the mess ? | |
# Bug reports / rfc | |
https://github.com/docker/docker/issues/8696 | |
# Set the ip of the Docker bridge with Systemd |