Skip to content

Instantly share code, notes, and snippets.

@erangaeb
erangaeb / lxc_storage
Created April 17, 2016 07:32
lxc storage
# location
/var/lib/lxc/<container-name>
# example
/var/lib/lxc/mongodb
@erangaeb
erangaeb / lxc_container_config
Created April 17, 2016 07:34
lxc container config
# location
/var/lib/lxc/<container-name>/config
# example
/var/lib/lxc/mongodb/config
@erangaeb
erangaeb / lxc_container_rootfs
Created April 17, 2016 07:35
lxc container rootfs
# location
/var/lib/lxc/<container-name>/rootfs
# example
/var/lib/lxc/mongodb/rootfs
@erangaeb
erangaeb / image_compress.sh
Created June 25, 2016 15:03
shell script to compress images
#!/bin/bash
# A script to resize images.
readonly OUT_FMT="_new.jpg"
if [ "$#" -eq 0 ] ; then
echo "A script to resize images "
echo "How to use : $(basename $0) add_of_image1 add_of_image2 ..."
exit 1
fi
for pic
do
# on boot2docker
/var/lib/boo2docker/profile
/etc/default/docker
# setting up insecure registry # 10.2.4.201 is the private registry host
DOCKER_OPTS="$DOCKER_OPTS —insecure-registry=10.2.4.201"
docker images
# command
docker rmi <image-id>
docker rmi -f <image-id>
# example
docker rmi 3f5b9885f749
# command
docker rmi <image-name>:<tag>
# example
docker rmi rabbitmq:0.7