Skip to content

Commit

Permalink
Minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
pmcao committed Feb 18, 2016
1 parent 80506fe commit 1d8fbfb
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
16 changes: 14 additions & 2 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,13 @@ Three required parameters are:

Example usage:
#+begin_src sh
docker run -t --rm --privileged \
$ docker run -t --rm --privileged \
-v /tmp/timemachine/:/tmp/timemachine/ \
csldepend/timemachine \
jessie \
20151231

Image created! Import by: docker import /tmp/timemachine/jessie-20151231.tar jessie:20151231
#+end_src

The resulting docker image =jessie-20151231.tar= is stored in a mounted
Expand All @@ -48,7 +50,17 @@ host>:/tmp/timemachine/= (Don't modify the part after the colon!).

Example usage:
#+begin_src sh
docker import /tmp/timemachine/jessie-20151231.tar jessie:20151231
$ docker import /tmp/timemachine/jessie-20151231.tar jessie:20151231

386ab9361803666d1bb592b7970f784f9faba6cd0f367aa3ad277762f8476e80
#+end_src

** Run the created image

#+begin_src sh
$ docker run -ti jessie:20151231 cat /etc/apt/sources.list

deb http://snapshot.debian.org/archive/debian/20151231T000000Z jessie main
#+end_src

* Contributors
Expand Down
7 changes: 4 additions & 3 deletions build_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ distribution=$1
datetime=$2

# create image using debootstrap
mkdir -p tmp_dir && cd tmp_dir && \
cd $tmp_dir && \
debootstrap $distribution ${distribution}-${datetime} http://snapshot.debian.org/archive/debian/${datetime}T000000Z/ && \
tar cvf ${distribution}-${datetime}.tar ${distribution}-${datetime}/* && \
echo "Image created! Import by: \n docker import $tmp_dir/${distribution}-${datetime}.tar ${distribution}:${datetime}"
cd ${distribution}-${datetime} && tar cvf ${distribution}-${datetime}.tar * && \
mv ${distribution}-${datetime}.tar .. && \
echo "Image created! Import by: docker import $tmp_dir/${distribution}-${datetime}.tar ${distribution}:${datetime}"

0 comments on commit 1d8fbfb

Please sign in to comment.