I need to copy a few files into my docker container.. Should be easy
right? Turns out it’s not so trivial. In Docker 1.0.0 and earlier the
docker cp command can be used to copy files from a container to the
host, but not the other way around…
Most of the time you can work around this by using an ADD statement in
the Dockerfile but I often need to populate some data within data-only
volume containers before I start other containers that use the data. To
achieve copying data into the volume you can simply use tar and pipe
the contents into the volume within a new container like so:\
Creating Your Own Minimal Docker Image in Fedora
Sometimes it can be useful to have a docker image with just the bare
essentials. Maybe you want to have a container with just enough to run
your app or you are using something like data volume
containers
and want just enough to browse the filesystem. Either way you can create
your own minimalist busybox image on Fedora with a pretty simple
script.
The script below was inspired a little from Marek Goldmann’s
post
about creating a minimal image for wildfly and a little from the busybox
website .
\
Manual Linux Installs with Funky Storage Configurations
Introduction
I often find that my tastes for hard drive configurations on my
installed systems is a bit outside of the norm. I like playing with
thin LVs, BTRFS snapshots, or whatever new thing
there is around the corner. The Anaconda UI has been adding support for
these fringe cases but I still find it hard to get Anaconda to do what I
want in certain cases.
An example of this happened most recently when I went to reformat and
install Fedora 20 on my laptop. Ultimately what I wanted was encrypted
root and swap devices and btrfs filesystems on root and boot. One other
requirement was that I needed to leave sda4 (a Windows Partition)
completely intact. At the end the configuration should look something
like:
\
TermRecord: Terminal Screencast in a Self-Contained HTML File
Introduction
Some time ago I wrote a few posts (
1,
2
) on how to use script to record a terminal session and then
scriptreplay to play it back. This functionality can be very useful by
enabling you the power to show others what happens when you do
insert anything here.
I have been happy with this solution for a while until one day Wolfgang
Richter commented on my original
post
and shared a project he has been working on known as
TermRecord.
I gave it a spin and have been using it quite a bit. Sharing a terminal
recording now becomes much easier as you can simply email the .html file
or you can host it yourself and share links. As long the people you are
sharing with have a browser then they can watch the playback. Thus, it
is not tied to a system with a particular piece of software and clicking
a link to view is very easy to do :)
Zero to Wordpress on Docker in 5 Minutes
Introduction
Docker is an emerging technology that has
garnered a lot of momentum in the past year. I have been busy with a
move to NYC and a job change (now officially a Red Hatter), so I am just
now getting around to getting my feet wet with Docker.
Last night I sat down and decided to bang out some steps for installing
wordpress in a docker container. Eventually I plan to move this site
into a container so I figured this would be a good first step.
Fedup 19 to 20 with a Thin LVM Configuration
Introduction
I have been running my home desktop on thin logical volumes for a while
now. I have
enjoyed the flexibility of this setup and I like taking a snapshot
before making any big changes to my setup. Recently I decided to update
to Fedora 20 from Fedora 19 and I hit some trouble along the way because
the Fedora 20 initramfs (images/pxeboot/upgrade.img) that is used by
fedup for the upgrade does not have support for thin logical volumes.
After running fedup and rebooting you end up with a message to the
screen that looks something like this:\
Nested Virt and Fedora 20 Virt Test Day
Introduction
I decided this year to take part in the Fedora Virtualization Test
Day
on October 8th. In order to take part I needed a system with Fedora 20
installed so that I could then create VMs on top. Since I like my
current setup and I didn’t have a hard drive laying around that I wanted
to wipe I decided to give nested virtualization a shot.
Most of the documentation I have seen for nested virtualization has come
from Kashyap Chamarthy. Relevant posts
are
here,
here,
and
here.
He has done a great job with these tutorials and this post is nothing
more than my notes for what I found to work for me.
BTRFS: How big are my snapshots?
Introduction
I have been using BTRFS snapshots for a while now on my laptop to
incrementally save the state of my machine before I perform system
updates or run some harebrained test. I quickly ran into a problem
though, as on a smaller filesystem I was running out of space. I then
wanted to be able to look at each snapshot and easily determine how much
space I could recover if I deleted each snapshot. Surprisingly this
information was not readily available. Of course you could determine the
total size of each snapshot by using du, but that only tells you how
big the entire snapshot is and not how much of the snapshot is exclusive
to this snapshot only..
Enter filesystem quota and qgroups in git commit
89fe5b5f666c247aa3173745fb87c710f3a71a4a
. With quota and qgroups (see an overview
here ) we can now see how big each of
those snapshots are, including exclusive usage.
Excellent LVM Tutorial for Beginners or Experts
I ran across a great PDF from this year’s Red Hat Summit in Boston. Hosted by Christoph Doerbech and Jonathan Brassow the lab covers the following topics:\
- What is LVM? What are filesystems? etc..
- Creating PVs, VGs, LVs.
- LVM Striping and Mirroring.
- LVM Raid.
- LVM Snapshots (and reverting).
- LVM Sparse Volumes (a snapshot of /dev/zero).
- LVM Thin LVs and new snapshots.
Check out the PDF
here
. If that link ceases to work at some point I have it hosted
here as well.
Hope everyone can use this as a great learning tool!
Dusty
Convert an Existing System to Use Thin LVs
Introduction
Want to take advantage of the efficiency and improved snapshotting of
thin LVs on an existing system? It will take a little work but it is
possible. The following steps will show how to convert a CentOS 6.4
basic installation to use thin logical volumes for the root device
(containing the root filesystem).
Preparation
To kick things off there are few preparation steps we need that seem a
bit unreleated but will prove useful. First I enabled LVM to issue
discards to underlying block devices (if you are interested in why this
is needed you can check out my post
here. )
\