docker run --rm -t -i phusion/baseimage:0.9.11 /bin/bash I use the baseimage-docker distro from phusion…its quite nice…includes bash, runit, and a few other nice features that make it feel like a full featured install that will work properly with docker (i.e. docker stop works correctly)
The “*–rm*” will remove the container after you leave it. This is generally preferred.
We just launch bash in this example. You could make your own image and launch it with zsh or the like:)
So I run multiple pastebin services. One day, a friend needed a paste from weeks ago and so to the database I went (using stikked). I needed to search the paste content, known as column “*raw*” and pull out the record corresponding to the content (date, id, etc..).
What’s awesome is you can use regex in all of your sql statements when searching anywhere in the db. So I just did this:
Setting up ssh keys is effectively very easy. You throw your pubkey in its own line in your $HOME/.ssh/authorized_keys file. However, you may not know that it matters very much the permissions that the following files have set:
home directory
.ssh directory
your authorized_keys file After doing this multiple times, here is the corresponding combination that works for me:
755, 750, or 700 (grp and other should have no write perms)
There is a pretty convienient way to save your docker images you build without needing to commit them to a registry:
docker save mynewimage > /tmp/mynewimage.tar
Then, to use it on a new host:
docker load < /tmp/mynewimage.tar
Thanks James!
So I needed to do per-directory hard quotas for my users. Luckily, xfs supports “project” quotas which allow a directory hierarchy to be soft or hard limited.
To set this up for a user, lets call him derpface:
Add the option “*pquota*” to fstab so the xfs partition gets mounted with project quotas enabled.
Run the following commands to setup the project and directory declarations:
mkdir /srv/derpface echo 1600:/srv/derpface >> /etc/projects echo derpface:1600 >> /etc/projid Note that the “1600?
And…putting an emphasis on uid/gid’s for when you really need to keep perms exact:
tar czpvf ../home.tgz --numeric-owner * .* Note that you don’t need the “p” when you run this as root.
Made a change to sudo and fudged up the line where I give myself certain permissions…
This caused a fun parse error that wouldn’t let me continue my “*sudo su*”
Its ok though, just run:
pkexec visudo
type your pass, and you’ll be dumped into the sudoers file for fixing!
Thanks, askubuntu!
http://sourceforge.net/p/parchive/bugs/74/
^This is a patch for people running gcc 4+. Use the patch command to apply it.
And then do the normal, ./configure, make, make install
Ran into this with my internal testing boxes. Basically, I would mount a simple insecure uid/gid mapped share:
/mnt 192.168.1.0/24(rw,all_squash,insecure,no_subtree_check,anonuid=1000,anongid=1000) on a testbox with a username different from the one of the server. But, the uid was the same (1000). With NFSv3, this would have been fine. With NFSv4, there are some differences. Hence things like ssh keys would not work because while I could remove and create new files, the files that existed there were still not technically mine?